Issue in adding keybinding

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.

[original thread by Nitika Sharma]

[Sören Domrös]

Are you binding your KeyBindingContribution in some frontend-module?

[Nitika Sharma]

yes

[Sören Domrös]

Are you binding your KeybindingContext too?

[Sören Domrös]

I do this:

bind(KeybindingContext).toDynamicValue(context => context.container.get(MyCoolKeybindingContext));

[Sören Domrös]

bind(MyCoolKeybindingContext).toSelf()

[Nitika Sharma]

i am trying to add key binding to hello world command, do i need to bind it to a context?

[Sören Domrös]

I am not sure about that. I use my keybindings always with a context and the guide also does it

[Nitika Sharma]

Okay, i will try binding a context to it

[Nitika Sharma]

does the command automatically displays the key binding associated to it

[Nitika Sharma]

in the menu ?

[Sören Domrös]

Yes

[Nitika Sharma]

Thanks @sdo