Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing a combination of keys 1

Status
Not open for further replies.

vbkris

Programmer
Jan 20, 2003
5,994
0
0
IN
hi,
can we capture a combination of keys as Ctrl+B in the keydown event???

Known is handfull, Unknown is worldfull
 
but then the script allows for detection of only the Ctrl key.
i want a script to fire if the user presses lets say ctrl+R (Together, not one after another)...

Known is handfull, Unknown is worldfull
 
but all you need to add is a check to see e.KeyCode is the key you need and that shiftPressed is true.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
o.k, i will check this. i was confused with the logic when i saw it, i will test it and come back to u...

Known is handfull, Unknown is worldfull
 
here's a sample with CTRL-S ( use it for saves in editing forms :

if (event.ctrlKey && event.keyCode == 83) {
blah blahb }

[thumbsup2]DreX
aKa - Robert
 
cool fellas, it works gr8...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top