Michael Winter hu kiteb:
[color=blue]
> "Mr. x" wrote on 14/11/2003:
>[color=green]
>> Hello,
>> I want to capture the event when the <ctrl> key is pressed.
>>
>> How can I do that ?[/color]
>
> This is under IE 6 (I don't have any other browsers, so someone else
> will have to chip in).
>
> A onkeydown event is fired when the CTRL key is pressed, but the
> event.which and event.modifiers properties are undefined (even when a
> letter key is pressed). This means that there is no reliable way to
> detect it. The onkeypress event doesn't work with modifier keys
> (ctrl, alt, shift, etc).[/color]
Both navigator 7 and explorer 6 can detect the onkeyup event, and do
recognise the control key. onkeydown and onkeypress may also be
supported. However, control+[key] combo keystrokes are rather more
difficult to detect. I haven't tried.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk