Ilya Medvedev
Ilya Medvedev

Reputation: 1279

How to detect Keyboard Combination with jquery?

I want make alert, that will be run after user presses Alt+F+U.

How to make it with jquery?

Upvotes: 2

Views: 761

Answers (3)

Haythem Tlili
Haythem Tlili

Reputation: 566

You can use the jquery js-hotkeys plugin. Example of usage :

$(document).bind('keydown', 'ctrl+c', fn);

Upvotes: 1

SShebly
SShebly

Reputation: 2073

try the below

shortcut.add("Alt+F+U",function() { alert("Pressed!"); });

Upvotes: -3

Alex Pliutau
Alex Pliutau

Reputation: 21957

It is a nice jquery plugin for binding hotkey combinations:

$(document).bind('keydown', 'alt+f+u', fn);

GitHub

Upvotes: 3

Related Questions