If key pressed equals

rp-7

#1

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?

Thanks

Jo


#2

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 7.0.0.3174

{EDIT}

Steps to repeat:

[ul]
[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
[/li][/ul]


#3

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

Thanks,
Vikram
key_pressed.rp (54.6 KB)


#4

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.


#5

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


#6

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?


#7

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!


#8

Thank you Tuomas.


#9

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).


#10

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!


#11

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?)


#12

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).


#13

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]


#14

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.


#15

`Hi,

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


#16

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)


#17

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:

https://docs.axure.com/axure-rp/widgets/text-fields-text-areas/#submit-button

I hope that helps!


closed #18

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