Hi.
I'm trying to override the default navigation using the KeyDownHandler client event. I want to skip over those columns or cells that are not editable when the user presses the arrow keys or the tab key. I am able to handle the left and right arrows okay now, and a regular tab, but I cannot figure out how to trap out a shift+tab (which would mimic the left arrow).
I would appreciate any input on this issue.
Hello,
It really depends how far you got with the KeyDownHandler (pasting some javascript code of the handler would help), but I guess you went almost to the end of your tasks since you already handle left, right and tab.
So I assume you already have the event passed to the KeyDownHandler to determine the actually key. To query for shiftKey you can use (assuming the event varaible is called e)
e.shiftKey
it returns true / false depending on the state of the shift key.
Is this helpful / close to what you need? Or maybe I am missing something?
Thank you for your response.
I'm using the Client Side KeyDownHandler. There doesn't seem to be anything to indicate that the shift is currently pressed.
But, I've found a solution. If the shift key is pressed (key #16), I'm setting a global flag in the keydown handle. If the shift is let go, I'm resetting the flag in the KeyUpHandler. Then if a tab is pressed while the flag is set, I mimic a Shift+tab. Otherwise I simply execute a normal tab.
I'll post the code once I have everything working. Maybe it will be helpful to somebody else in the future.