This is a migrated thread and some comments may be shown as answers.

[Solved] Override browser hot keys on client side

1 Answer 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
muhammad toori
Top achievements
Rank 1
muhammad toori asked on 29 Jan 2010, 10:54 PM
Hi all
I want to be able to allow users to add/delete/update/select rows in a radgrid using hot keys. Some of these hot keys like Ctrl+E  (search) and Ctrl+S (save) are browser hotkeys. I use ClientSettings event OnKeyPress to define what the hot key should do using javascript. The problem is that when i use Ctrl+E or Ctrl+S or any other windows Hot keys OnKeyPress is not even called because the hot key is already taken. How can i override the default hot keys so that i can define my own on the client side


Thanks

1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 01 Feb 2010, 02:15 PM
You can do this by accessing they key codes in javascript and then executing whatever code you might want. I think the following blog post can really help:

http://www.scottklarr.com/topic/126/how-to-create-ctrl-key-shortcuts-in-javascript/
Tags
Grid
Asked by
muhammad toori
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or