Copy/paste keyboard shortcuts not detected by key press (mac)

I want to do the following:

  1. Click on rectangle #1
  2. Press Cmd-C on my keyboard to copy text on rectangle #1.
  3. Click on rectangle #2
  4. Press Cmd-V on my keyboard to paste text on rectangle #2.

I set up my prototype to copy rectangle #1’s text to a global variable on key press of Ctrl-C, and then set rectangle #2’s text to the global variable on key press of Ctrl-V. When each rectangle is clicked, I put focus on them.

This doesn’t work on Mac. It appears that Axure isn’t detecting the Ctrl-C and Ctrl-V key press. I’m not sure if it’s because it’s really Cmd-C and Cmd-V on a mac. When I edit the condition on Key Press and type the key I want it to detect, I type Cmd-C on my mac and Axure records it as “Ctrl-C”. I’d like this to work on both Windows and Mac. (I don’t have a Windows machine so I can’t tell if it works on Windows.)

My prototype works fine if I detect a key press of “c” and “v” on my keyboard instead of “Ctrl-C” an “Ctrl-V”.

Example attached.

Thanks for the help!
copy paste.rp (61.6 KB)

Hey judyjeu,

I checked in with our dev team regarding the [Cmd] key getting recorded as [Ctrl] and it looks like this is the expected behavior. I can put in a feature request if you’d like, but for now it looks like [Cmd] gets inputted as [Ctrl] because it maps more closely to [Ctrl] on PC.

Regarding your file, it looks like everything is working correctly on my end. When I preview your file in Chrome, Firefox, and Safari on OS X, using [Ctrl]+[C] and [Ctrl]+[V] seems to properly copy and paste the values to and from your variable. Is this still not working on your end? If so, what version and build of Axure RP are you using (I’m using 7.0 build 3184), and what browser (and version of the browser) are you testing on?

Now that I’ve read your reply, I tried using Ctrl-C and Ctrl-V on my mac. (NOT Cmd-C and Cmd-V.) That works, I guess because Axure translated my Cmd-C keypress as Ctrl-C, so I need to press Ctrl-C on my mac. I had my co-worker try it on her Windows machine and it works with Ctrl-C and Ctrl-V.

Unfortunately Ctrl-C and Ctrl-V aren’t the way you copy & paste on a mac. It would be nice if I could capture the Cmd-C keystroke as well as Ctrl-C so this would work in the expected way on both Mac & Windows. For example, the condition could check if keypress = Ctrl+C or keypress = Cmd-C.

The workaround is to test my prototype on a Windows machine. (I’m using it partly for usability testing so I want my participants to copy/paste in their usual way, rather than a different set of keystrokes I tell them to use.)

Gotcha. I’m glad to hear that using [Ctrl] is working for now as a workaround. I’ll go ahead and put in a feature request on your behalf asking for [Cmd] to also be recognized as a keystroke in Axure RP.

I backup this.
I need to CMD+click to select multiple elements (I need to implement this behaviour in the prototype).
Unfortunately the CTRL workaround doesn’t work in this case because CTRL+click on a mac brings the context menu and nothing else.

Hi MariusPetrescu,

There isn’t a way to suppress the context menu from being opened for an entire prototype, however I’ll be happy to submit a feature request for the ability to do this to our PM team.

Using the “OnContextMenu” event on your widgets might help in the meantime, which is triggered whenever the context menu would be opened (e.g. via right-click or [CTRL] + click). You can find this event in the “More Events” dropdown menu in the interactions section:

You could try putting your selection actions into this event and those actions would be carried out instead of the context menu opening when the widget is right-clicked. I hope this is helpful!