This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var extend_keyboard_event_with_keycode = function(original_event_name) { | |
| var $fn_original = $.fn[original_event_name]; | |
| var keyboard_event_function_wrapper = function(keycodes, handler) { | |
| return function(e) { | |
| if(keycodes.indexOf(e.which) != -1) | |
| return handler(e); | |
| } | |
| } |