There is no problem with @mVChr solution in this solution: I.e. you can click on another input with the mouse and start typing without losing focus due to keydown binding.
Also, this solution does not remove all keydown bindings elements, but instead uses a named handler.
var default_input_handler = function() { $('.default-input').focus(); $(document).off('keydown', default_input_handler); } $(document).on('keydown', default_input_handler); $('input, textarea, select').on('focus', function() { $(document).off('keydown', default_input_handler); });
source share