I have a .NET WebBrowser control that I use to display some of the heavy pages that I wrote. Pages use YUI and have been designed to be portable.
I just found that although I can capture keypress in javascript, I cannot capture keyup or keydown in javascript . This does not allow me to connect ESC, CTRL + A, UP, RIGHT, TAB, for example.
I understand that I can grab keys in .NET and that there are hacks for some of them. For example, Document.ExecCommand ("SelectAll", .., ..) for CTRL + A. --- By the way, I still cannot get SendKeys.Send ("{TAB}") to work on the --- tab. I understand that I can use .NET to execute a function that processes the UP arrow, but for reasons of portability and best practice, I really don't want to do this.
Can someone explain why I cannot capture keyup / keydown events in javascript or suggest a workaround?
Thanks!
George
source share