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

  • Home
  • SEARCH
  • 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 3346142
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:16:07+00:00 2026-05-18T01:16:07+00:00

The jquery.hotkeys plugin lets you easily add and remove handlers for keyboard events. However,

  • 0

The jquery.hotkeys plugin lets you easily add and remove handlers for keyboard events. However, this plugin can handle keyboard event only but not mouse click event. So it does not support something like:

$('#gallery li.icon').bind('click', 'ctrl+leftbutton', function() {
    $(this).addClass('selected');
});

I know this is not difficult to implement, but I am curious if someone has already posted a neat solution for this.

  • 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-05-18T01:16:08+00:00Added an answer on May 18, 2026 at 1:16 am

    You can just check the event’s .ctrlKey property for this, for example:

    $('#gallery li.icon').click(function(e) {
      if(e.ctrlKey) $(this).addClass('selected');
    });
    

    In this we’re just checking if the Ctrl key is down then the click event happened. Just to be clear, .ctrlKey is basic JavaScript, there’s no dependency on the hotkeys plugin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In jQuery, is there a function/plugin which I can use to match a given
I am attempting to overwrite a core jQuery event, in this case the keydown
with jquery,how can i do something just after the dom loaded,i write like this:
jQuery.fn.add = function() { var Bnumber = $(this).find(.B_Add); if (Bnumber) { Bcount = parseInt(Bnumber.html())
Jquery has a great language construct that looks like this: $(document).ready(function() { $(a).click(function() {
Using jQuery , how can I dynamically set the size attribute of a select
Using jQuery, how do you bind a click event to a table cell (below,
I'm trying to add some keyboard support for a website I'm working on and
I'm adding hotkeys to a web application in order to enable keyboard shortcuts for
I use jQuery-hotkeys And the following code: $(document).bind('keydown', 'ctrl+s', function(){$('#save').click()}); but I cannot disable

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.