unbind key

43 views
Skip to first unread message

Brad Moran

unread,
Dec 12, 2020, 8:22:24 PM12/12/20
to Ajax.org Cloud9 Editor (Ace)
Is there a way to unbind a keybinding without knowing what command it's bound to? I could search byName, but I hoped there was a built-in.

For example, I have my own key bindings for certain things; and if a user chooses one that's assigned to an ACE command it doesnt fire. So when a user select CTRL-F for some function, I want to be able to disable the key in ace. Iv'e tried

editor.command.bindKey('CTRL-F',null); 

but that doesnt work.

Brad Moran

unread,
Dec 13, 2020, 8:10:26 PM12/13/20
to Ajax.org Cloud9 Editor (Ace)
In the time it took for this to be approved I found editor.commandKeyBinding

Brad Moran

unread,
Dec 14, 2020, 11:40:40 AM12/14/20
to Ajax.org Cloud9 Editor (Ace)
Although I'd still like to know if there's a command to unbind a key. For example, user sets "Find" to Ctrl-F. It would be useful to just 

unbind('ctrl-f');
bindKey('find','ctrl-f');

I could write these myself of course, but every time I do I later find there's something built in to do the same thing

Reply all
Reply to author
Forward
0 new messages