If key pressed equals

Hello all

I can’t seem to get the “” key to work in my prototype.

Wondering if anyone else has had this problem or if there’s a fix for it?



Yes, I’m getting the same problem. The condition builder recognises the key press when building the logic, but does not both in preview and in generated html.

Testing using Safari and Firefox (V 30.0) on OS X 10.8.2 with Axure Pro build


Steps to repeat:

[li]Create a new rp file
[/li][li]Add a rectangle widget
[/li][li]Hide the widget
[/li][li]Add to OnPageKeyDown: If key pressed equals ‘’ toggle visibility of (shape)
[/li][li]Preview the prototype
[/li][li]Press the \ key
[/li][li]Generate the html
[/li][li]Open the generated html
[/li][li]press the \ key
[/li][li]In either case, the visibility of the widget does not toggle on or off

I think it is working for me. I’m not entirely sure if this is what you mean.

key_pressed.rp (54.6 KB)

That, I can get working.

I should have been clearer in my bug reporting. Apologies.

Will now include instructions to repeat the error in my previous post.

This might be because “” is an escape character in javascript.

Thanks for the replies.

I am using the “” key like this, on page interactions:

Case 1
(if key pressed equals )
Open Home in Current Window

I have to use this key as I am using a flirc & remote control which has the backslash key programmed as back.

I think it may be a bug, or not allowed?

Hi johiggins,

Thanks for reporting this. You’re right; it looks like you can’t use “” for the key pressed condition. There are a few non-alphanumeric keys that don’t work with this condition. The question is really whether this is a limitation or an oversight, which is something we’ll have to investigate.

I’ll go ahead and log this to make sure we get to the bottom of it.

Thanks again!

Thank you Tuomas.

Having a similar thing happen with “-”. Works with ‘dash’ on keyboard, but not with ‘minus’ on numeric pad.

What’s interesting, is that when editing condition, ‘minus’ is accepted - but it doesn’t work in the preview, whilst ‘dash’ DOES work in preview (even when ‘minus’ is typed in the condition statement).

Hi swansong86,

I’m seeing similar behavior as I test, and I’ll be touching base with our QA team for closer review. Could you let me know which version of OS X (or Windows) you’re running as well? And are you using any sort of external keypad? Thanks!

I’m getting the same problem with Axure 8 and Tab. I can set Key pressed equals Tab in the case editor but it isn’t recognised and simply moves me to the next field.

Is this a bug or is it me (and will it be fixed in 9?)

Hi wootlebug,

It isn’t you! This is a current limitation of Axure RP where certain keys do not register for “if key pressed” conditions (such as the [Tab] key). This looks to be the same in the 9 beta, but I’ll go ahead and submit a request to see if we could include [Tab] as a working key for the condition. For now, what may help is to use the OnPageKeyUp event to register the [Tab] key press (though the focus will still get set to the next form widget).

key press condition bug.rp (47.5 KB)

Here is an example illustrating a buggy If Key Pressed condition:

  1. click the button => it stays blue and textfield value is Shift = false
  2. press [shift] and click the button simultaneously => button turns brown and textfield value is Shift = true
  3. release [shift] and click the button => button should turn blue and textfield value should be Shift = false, but stays brown and textfield value is Shift = true -> this is an error.

Button stays brown until user presses any other button than [Shift]

Hi alexeir,

Thanks for the report! It looks like Axure RP holds onto key presses even after release, incorrectly triggering the interaction, and I’ve filed this with our QA team for further investigation.


How can I check caps lock on input field? For example: http://www.uxforthemasses.com/wp-content/uploads/2015/03/Capslock-on-message.jpg

Hi, am trying to create the following:

  1. A read only text box.
  2. User double-clicks on it to make it editable.
  3. Once user hits the “Return” key - it goes back to look like a read only text box.

I tried a few different options, Look like this issue has not been solved. Not even in the current version (9).

Attaching a file with an example of what I wanted to do, only instead of the “If key pressed equals Return” I trigged it with a click on the surrounding box.

Following for updates.
doubleclick_textfield.rp (50.3 KB)

Hi rafo!

For this particular design, it looks like a workaround could be to use the text field’s submit button interaction to have pressing the [Return] key fire an OnClick event for the “frame1” widget. When the key is pressed, the submit button property fires the “frame1” widget’s OnClick event, and actions similar to those on the OnLostFocus event can fire: the selected state can be set to “false”, the text can be set to equal the text on the text field, and the “frame1” widget can be brought to the front.

Here’s an edited version of your file for review:

doubleclick_textfield-submitbutton-sample.rp (49.4 KB)

You can learn more about text field’s submit button feature on our site here:


I hope that helps!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.