My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 536: Added Vim (hjkl) keyboard navigation
4 people starred this issue and may be notified of changes. Back to list
Status:  Started
Owner:  ----

Sign in to add a comment
Reported by, Jun 12, 2009
What is the expected output? What do you see instead?
The h, j, k, and l keys would perform the same actions as the left, down, up, and right arrow keys, 
respectively, when pressed in conjunction with a modifier key (suggested: the control key).

What version of the product are you using? On what operating system?, 10.5.6

Please provide any additional information below.
Beyond Vim, many Gmail users will be accustomed to "jk" keyboard navigation. It keeps your hands 
on the keyboard at home row (with a QWERTY keyboard). See Launchbar for an example.
Jun 15, 2009
Project Member #1
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Jun 22, 2009
I've started working on this.  I get that j/k should move up and down the results
list.  Sean (or others), what do you think that h and l should do?  Move the text
cursor in the entered string, or (de)pivot from results?  I'm thinking that latter
would be more useful, but I'm not sure.  Thoughts?
Jun 22, 2009
That's excellent. Thank you. I think it would be most useful if h and l behaved like the left and right arrow keys 
respectively. This would be particularly useful when drilling 'shallower' or 'deeper' through folder structure or 
through actions for a given result. Is that what you mean by (de)pivot the results?
Jun 22, 2009
Yes.  Specifically, say you've pivoted into a folder and entered some further text to
search in that folder.  Now say you press ctrl-h.  Should that move the cursor to the
left in the text entered (just like the left arrow), or immediately pivot out of that
folder and back into the higher level search?
Jun 22, 2009
Project Member #5 dmaclach
I would have the vi keys mimic the arrow keys exactly. Keep them consistent please.
Status: Started
Jul 22, 2009
I actaully have a patch for this, but in the process of writing it, I thought of an
IMHO better solution.  Instead of modifying the code of QSB, the user(s) who want
this feature can modify their system-wide keybindings to map ctrl-h,j,k,l to left,
down, up, right movement.  In order to do this, add these lines to the file
~/Library/KeyBindings/DefaultKeyBindings.dict, creating the file and containing
folder if it doesn't exist:

	"^h" = "moveLeft:";
	"^j" = "moveDown:";
	"^k" = "moveUp:";
	"^l" = "moveRight:";

These lines must be enclosed in curly braces.  If you create the file, be sure to do
so; if it already exists there will already be a set of braces.  (For more info:

The only downside is that this change will be system-wide, and some users might not
want that.  But it seems the request for vim-style keys is uncommon enough (receiving
only two stars on here, including mine) that I don't think we should add special code
to QSB to accomplish that.  I'll push the patch to Rietveld if devs think it is worth
including anyway.
Sign in to add a comment

Powered by Google Project Hosting