Detecting Function Key press on DHTMLEdit control
Posted on 2006-10-24
I cant find a method that im completely happy with for detecting the press of a function key on the DHTMLEdit Control. I specifically am trying to test for F7 but i get the same problem with any function key.
The onkeypress events doesnt fire. It only seems to fire for printable characters.
The onkeydown event does fire. If you then query the event you get the keycode 118 (for F7) e.g.
118 is also the same keycode as you get in the onkeypress event for "v" so i dont trust it. Strangely in my test environment onkeydown does not seem to fire when you press a printable character but i dont trust that it never will.
I was hoping i could let the event bubble up to the control i have placed the DHTMLEdit control on, but no such luck. The DHTMLEdit control seems to swallow it.
Is there another method to check for the press of a function key whilst the focus is on the DHTMLEdit control?