views:

397

answers:

1

Hi all, I need to enable alt-<key> selection semantics for some Buttons in my application. If I write KeyDownEventListener for the Button, its not getting triggered when I press ALT key in the keyboard. Is there any way to enable alt key semantics for the buttons?

Thanks in advance

A: 

KeyboadEvent class has an altKey property that you can use to check if Alt key was held-down while the current key was pressed.

Amarghosh
Thanks for your quick reply. but when i press some key along with altkey, the event is not getting fired. so iam unable to read that property
madanmohan
I just read the docs and found that it is supported only in windows - went on and tested in windows to find that it is fired only when you press alt + ctrl. It seems you are gonna have to resort to some other key like ctrl key
Amarghosh