I would like to disable the ACE Editor's find dialog, which is invoked by pressing the Command + F key combination when the editor has focus.
I've tried the following (among other things):
document.body.onkeydown =
document.body.onkeyup =
document.body.onkeypress = function(event) {
return false;
};
This prevents one from being able to type normally, but does not stop Command + A key from being processed.
How do to prevent Command + F combination from being processed?
Ideally I would like to be able to prevent only the Command + F combination, as I want to continue using the other Command key combinations.
I have set up a JSFiddle for this question.
It's better to use 'removeCommand' instead of use 'addCommand' with fake handler
editor.commands.removeCommand('find');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With