JavaScript or jQuery event handlers for “Ctrl”/”Shift” + mouse left button click

You can do something like this (jQuery for the click handler, but any framework works on the part that matters):

$(selector).click(function(e) {
  if(e.shiftKey) {
    //Shift-Click
  }
  if(e.ctrlKey) {
    //Ctrl+Click
  }
  if(e.altKey) {
    //Alt+Click
  }
});

Just handle whichever you want inside an if inside the click handler like I have above.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)