I am using the muzapeet to capture the key press. One shortcut I want to define is to focus on one input.
Mousetrap.bind ('i', function () {$ ('input'). Focus ()});
Focusing work is fine, but the 'I' keypad also blows on the input, and with focus, the input also pops up with 'i'.
Is there any way to stop 'I' from being written in the input?
Correct:
Blockquote>
A feature You can also return false to your callback as follows:
interrupt. (['Ctrl + s', 'meta + s'], function (e) {_saveDraft () ; Return back;});
False Returning works exactly the same way that jQuery returns false. This prevents the default function and closes the event with bubbling.
Such:
Musetramp.top ('i', function () {$ ('.input'). Focus (); return false; });
No comments:
Post a Comment