Keybindings not working in Coding mode



I’m new to Atom. I switched from emacs.
At first I wanted create some keybindings. I want to switch between tabs with Alt-left and Alt-right but I don’t get this correctly to work.
My keymap at this section:

‘body’: {
‘alt-left ^alt’: ‘unset!’
‘alt-left’: ‘pane:show-previous-item’
‘alt-right ^alt’: ‘unset!’
‘alt-right’: ‘pane:show-next-item’

When I hit the keys, the tabs are not switching as long as I’m on a code file. If I for example on the settings tab, the binding works. When I open the keybinding resolver, I see that the binding gets hit.
What I have to change to get this work?


Try this:

  'alt-left': 'unset!'
  'alt-right': 'unset!'
  'alt-left': 'pane:show-previous-item'
  'alt-right': 'pane:show-next-item'

The existing keybindings are working on the selector atom-workspace atom-text-editor. So we can tell atom-text-editor to ignore those previous keybindings and allow the key press event to bubble up to the body element. Otherwise, the child element takes precedence as it is more specific by definition.