Results 1 to 3 of 3

Thread: Multiple keystroke detector

  1. #1
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default Multiple keystroke detector

    Hello,
    I have seen on this forum MULTIPLE keystroke detectors, ie. when you press Alt + S it submits the Quick Reply message. I found a similar script on DD that only alows letter keys and only one of them. Can someone please show me a script that does this (jumps to a page or does an action, when multiple keys are pressed, one in which is not a letter)?
    Thanks in advanced.
    --FSD
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    See:

    http://www.quirksmode.org/js/keys.html

    The short answer though is that there are so many reserved key combos (and these vary from browser to browser, system to system) that this is impractical. Even with single keys, you may be grabbing half of a predefined combo and that could have odd results for the user. It's best to find another way to do whatever it is that you want to do. Some way that doesn't involve intercepting and interpreting the meaning of key press events.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The "detector" used here is just the accesskey attribute, I think.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •