menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

Issue in adding keybinding

February 6, 2019 at 2:37pm

Issue in adding keybinding

February 6, 2019 at 2:37pm
registerKeybindings(keybindings: KeybindingRegistry): void {
keybindings.registerKeybinding({
command: testCommands.SAY_HELLO.id,
keybinding: 'f5'
});
I was trying to add key binding as per theia documentation however it doesn't seems to be working. I don't get any error. Also i cannot see the keybinding values in the menu.

February 6, 2019 at 3:13pm
Are you binding your KeyBindingContribution in some frontend-module?
Are you binding your KeybindingContext too?
I do this:
bind(KeybindingContext).toDynamicValue(context => context.container.get(MyCoolKeybindingContext));
Edited
bind(MyCoolKeybindingContext).toSelf()
Edited
like-fill
1
i am trying to add key binding to hello world command, do i need to bind it to a context?
I am not sure about that. I use my keybindings always with a context and the guide also does it
Okay, i will try binding a context to it
does the command automatically displays the key binding associated to it
in the menu ?