1var General; 2(function (General) { 3 var HotKeys; 4 (function (HotKeys) { 5 class HotKeyService { 6 constructor(enableDebugging) { 7 this.debuggingTitle = "HotKeyService - "; 8 this.init(enableDebugging || false); 9 } 10 init(enableDebugging) { 11 this.setHotkeys((new HotKeys.HotKeyMapping).getMapping(), enableDebugging); 12 } 13 setHotkeys(hotkeys, enableDebugging) { 14 document.addEventListener("keydown", (e) => { 15 if (enableDebugging) { 16 console.log(this.debuggingTitle + "KeyDown", e); 17 } 18 var hotkeyMatches = hotkeys.filter(hotkey => hotkey.checkIfMatch(e)); 19 if (hotkeyMatches.length > 0) { 20 var hotkeyMatch = hotkeyMatches[0]; 21 if (enableDebugging) { 22 console.log(this.debuggingTitle + "Hotkey match found", hotkeyMatch); 23 } 24 if (hotkeyMatch.preventDefaultEvent) { 25 e.preventDefault(); 26 } 27 hotkeyMatch.execute(e); 28 } 29 else { 30 if (enableDebugging) { 31 console.log(this.debuggingTitle + "No hotkey match found"); 32 } 33 } 34 }, false); 35 } 36 } 37 HotKeys.HotKeyService = HotKeyService; 38 })(HotKeys = General.HotKeys || (General.HotKeys = {})); 39})(General || (General = {}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.