jw970170
Programmer
- Aug 8, 2005
- 38
Hi,
I have a problem with a simple program I am trying to write. It is a calculator. All the operations work fine but I want the numbers keys on the keyboard to be short cuts to the keypad of the calculator. I want pressing "1" on the keyboard to have the same effect as clicking the button "one". I found out that I could use keyboard events with onkeydown() however aparently it only works if I have no other control on the dialog window or if all the other controls are disabled.
Do you know how I could use keyboard events even if I have other buttons on the dialog window. I don't want to have to name my buttons &1 and short cut to the keys that way.
I have a problem with a simple program I am trying to write. It is a calculator. All the operations work fine but I want the numbers keys on the keyboard to be short cuts to the keypad of the calculator. I want pressing "1" on the keyboard to have the same effect as clicking the button "one". I found out that I could use keyboard events with onkeydown() however aparently it only works if I have no other control on the dialog window or if all the other controls are disabled.
Do you know how I could use keyboard events even if I have other buttons on the dialog window. I don't want to have to name my buttons &1 and short cut to the keys that way.