lundi 29 septembre 2014

Using the Ace Code Editor, can I have F3 have the same behavior as Ctrl+F?


Vote count:

0




I'm using the Ace Code Editor for a Chrome extension, details here: http://ace.c9.io/


With the Ace Editor, Ctrl+F brings up a dedicated search element, while F3 just brings up the browser's native search element. Is there any way to have F3 function the same way as Ctrl+F? I've been trying with Ace's keybindings (and jQuery), but so far no luck.


The best I've come up with so far:



editor.commands.addCommand({
name: 'f3search',
bindKey: { win: 'F3' },
exec: function(){
var e = $.Event('keydown');
e.which = 70;
e.ctrlKey = true;
$('pre.ace_editor').trigger(e);
}
});


It just doesn't seem to apply the keybinding to load Ace's dedicated search. Help!



asked 41 secs ago







Using the Ace Code Editor, can I have F3 have the same behavior as Ctrl+F?

Aucun commentaire:

Enregistrer un commentaire