Skip to main content
Italian4215
Inspiring
January 20, 2016
Answered

Alt+down arrow pressed javascript

  • January 20, 2016
  • 2 replies
  • 3354 views

How would I input a javascript for onFocus that says the alt key and down arrow are pressed (even though they arent)?

event.altKey==true

I know that is how you get the alt key to say it is pressed, but how do you do the down arrow with it (combination)?

The Keycode for the down arrow is 40 but I don't know how to link it to the alt key saying both are pressed even when they arent.

Any help would be amazing. Thanks.

This topic has been closed for replies.
Correct answer try67

If that isn't possible then how would I make it so that if for example the word "Other" was selected from a drop down menu to make the drop down editable with the cursor in the field and a default of "Please enter your name" else it is just a regular dropdown and not editable?


You should use a separate field (a text field) that you can display when Other is selected for the user to fill in additional information.

2 replies

Inspiring
January 20, 2016

I do not see a altKey property as a property for the event object. There is a keyDown property for use as part of the keystroke event for combo and list boxes. There is also the modifier property for any event.

Italian4215
Inspiring
January 21, 2016

Apparently the KeyDown function is not allowed when you have an editable dropdown. So I am going to do what Try67 mentioned above.

Italian4215
Inspiring
January 20, 2016

Is this possible? I need this for a editable dropdown menu. GKaiseril try67 ??? All help is appreciated. Thanks

try67
Community Expert
Community Expert
January 20, 2016

I don't think it's possible. These kind of properties are typically

read-only.

On Wed, Jan 20, 2016 at 8:48 PM, Italian4215 <forums_noreply@adobe.com>

Italian4215
Inspiring
January 20, 2016

If that isn't possible then how would I make it so that if for example the word "Other" was selected from a drop down menu to make the drop down editable with the cursor in the field and a default of "Please enter your name" else it is just a regular dropdown and not editable?