How to piggie back on the 'core:move-up' command?


#1

Hi!

I am trying to write a plugin for atom, I have been heavily inspired by the command palette plugin and space-pen.
I am trying to navigate through a list of result like with the command pallette.

I use

atom.commands.add(self.element, {
‘core:move-up’: (e) => {
self.selectPreviousItemView();
return event.stopPropagation();
},
‘core:move-down’: (e) => {
console.log(‘move down triggered’)
self.selectNextItemView();
return event.stopPropagation();
},
});

but the move down is never triggered. Do I need to do something else? Like declare it in the keymap file?

Thank you,


#2

Nevermind, solved it, anyone who might have this problem, I switched to a css selector to make it work