Jun 13, 2021 — When implementing a shortcut key handler, the keypress event is usually better ... If the system is Windows and the native keycode of the pressed key ... "Escape", 0x1B (27), 0x1B (27), 0x1B (27), 0x1B (27), 0x1B (27), 0x1B .... ... user presses the ESC key. I can't figure out how to hook the keydown event. ... $(document).keydown(function(e) { // ESCAPE key pressed if (e.keyCode == 27) ... In case if any looking for angularjs popup solution here you go. *this is witho