Inhumanoid
Aug 21st, 2001, 08:09 AM
I've noticed some strange stuff when experimenting with keypressing in IE.
I retrieve ASCICODE using window.event.keyCode (within document.onkeypress(). I can find out if ctrl was pressed using: window.event.ctrlKey.
However when i press a character and the ctrl-key I get a different window.event.keyCode then I would without pressing the ctrl-key.
example: pressing v gives me: 118, pressing v with ctrl gives me: 22 (with window.event.ctrlKey being true).
How can I ever find out which character was pressed ?
Also is it possible to catch alt+character I have not been able to de that, same goes for function keys (F.I. F1), i can't seem to catch them either...
I retrieve ASCICODE using window.event.keyCode (within document.onkeypress(). I can find out if ctrl was pressed using: window.event.ctrlKey.
However when i press a character and the ctrl-key I get a different window.event.keyCode then I would without pressing the ctrl-key.
example: pressing v gives me: 118, pressing v with ctrl gives me: 22 (with window.event.ctrlKey being true).
How can I ever find out which character was pressed ?
Also is it possible to catch alt+character I have not been able to de that, same goes for function keys (F.I. F1), i can't seem to catch them either...