Try It Out
Try the following keyboard shortcuts in your browser window:
Shift + Up Arrow
Shift + Down Arrow
Shift + Left Arrow
Shift + Right Arrow
Shift + U
Shift + I
Shift + J
Shift + K
Shift + C
Shift + Enter
What is this?
This is an example of manipulating window position using keyboard shortcuts similar to the mac application Magnet. This jQuery plugin binds keyboard shortcut events to the window element and when a key combination is pressed, an event is triggered following that keyboard shortcut.
Options
- debug (boolean)
- This option will log the keyboard shortcuts being executed in the console as they are triggered.
Get Started
- Include jQuery
- Include Keyboard Shortcuts jQuery Plugin
- Initialize
$(window).initKeyboard()
- Add events
-
$(window).on('Shift+▶', function(){ // Execute function here });
-