Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:33:59+00:00 2026-06-03T02:33:59+00:00

Basically, I’m using jQuery Hotkeys plugin by Mr Resig to capture and handle shortcuts

  • 0

Basically, I’m using jQuery Hotkeys plugin by Mr Resig to capture and handle shortcuts like ctrl+o etc…

OK, maybe I don’t uderstand the concept, but I was under the impression that a ctrl+o triggered anywhere inside the document will be captured by a document hotkey handler.

For example, the following code works in general…

jQuery(document).bind('keydown', 'ctrl+o', fn);

However, it fails miserably if the user triggers the hotkey when inside an input box.

It only works if I do the following:

jQuery('body, input').bind('keydown', 'ctrl+o', fn);

Which is pretty bad for my health since it involves binding the damn handler each time a new input box is added to the DOM. Worse still, I have no idea what to bind to in the case of complex widgets like CodeMirror.

Dunno if my problem makes sense, perhaps I’m using the wrong approach? I also tried binding to the following objects, but it didn’t work: window, document, body, div[contains the whole page]

NB: You can try it out here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:34:03+00:00Added an answer on June 3, 2026 at 2:34 am

    This is actually intended functionality of the plugin:

    // Don't fire in text-accepting inputs that we didn't directly bind to
    if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
        event.target.type === "text") ) {
        return;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I have some variables that I don't want to preinitialize: originalTime = None
Basically I would like to store the address of a pointer in a buffer.
Basically I'd be looking to implement a method like this. IQueryAble GetQuery<T>(Entities db) or
Basically, I would like to decode a given HTML document, and replace all special
Basically from a database I am getting data that is formatted like this nameofproject101
basically I have a function that resizes elements accordingly with jquery triggering the function
basically i would like to display .doc file in WWW, i've tried to fetch
Basically, I would like a page that consist of a slideshow that contains a
Basically, I would like a brief explanation of how I can access a SQL
Basically I want to know how to set center alignment for a cell using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.