|
November 14, 2000 Probing the Left CTRL Key Tips: November 2000
Yehuda Shiran, Ph.D.
|
|
Starting with IE 5.5, you can set and retrieve the status of the left CTRL key. You can detect its status by probing event.ctrlLeft. It is true when the key is pressed, false otherwise. You can also set event.ctrlLeft.
Currently, this property is supported only by Windows NT and 2000. If you try this on Windows 95/98, the response will be as if the right CTRL key is pressed. You have to make sure that the
document has focus, which you do by calling Try pressing the left CTRL key.
You will get an alert, showing the pressed key. You should get
The event handler is defined as:
Read more about events and event handling in Column 11, The Cross-Browser Event Model.
People who read this tip also read these tips: Look for similar tips by subject: |