Home Download Buy Blog Forum Support

Custom key bindings for sidebar navigation?

Custom key bindings for sidebar navigation?

Postby jondavidjohn on Mon Jul 09, 2012 4:21 pm

Are there key binding actions that we can use to remap our keyboard navigation of the sidebar?

Code: Select all
{ "keys": ["j"], "command": "sidebar_nav_down",
    "context":
    [
        { "key": "setting.sidebar_focused", "operand": true },
    ]
}


{ "keys": ["k"], "command": "sidebar_nav_up",
    "context":
    [
        { "key": "setting.sidebar_focused", "operand": true },
    ]
}
jondavidjohn
 
Posts: 10
Joined: Thu Oct 13, 2011 4:53 pm

Re: Custom key bindings for sidebar navigation?

Postby C0D312 on Mon Jul 09, 2012 6:07 pm

Code: Select all
  { "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true}, "context":
     [ {"key": "control", "operand": "sidebar_tree"} ]
  },
  { "keys": ["k"], "command": "move", "args": {"by": "lines", "forward": false}, "context":
     [ {"key": "control", "operand": "sidebar_tree"} ]
  }


This seems to work but has some issues when it comes to folders (Even if the folders are collapsed, it still traverses the contents). I'm assuming move by line is not the correct command in this case. You can play around with it though. Maybe Jon knows.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Custom key bindings for sidebar navigation?

Postby jondavidjohn on Mon Jul 09, 2012 6:47 pm

awesome, will play around with this. is there any documentation for the "move" command?
jondavidjohn
 
Posts: 10
Joined: Thu Oct 13, 2011 4:53 pm

Re: Custom key bindings for sidebar navigation?

Postby C0D312 on Mon Jul 09, 2012 7:45 pm

No, but you can look at the default keybindings for more options.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 13 guests