key assignments j and k are backwards

Development-related discussion, including bundled plugins
User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

key assignments j and k are backwards

Postby gmargo » 06 Feb 2012, 23:43

I like the key assignments for the most part, but any "vi" user will say that "j" and "k" are backwards. "j" should be "down" (aka "next") and "k" should be "up" (aka "previous").

So I use this patch, which switches the j/k assignments. :

Code: Select all

diff --git a/js/tt-rss.js b/js/tt-rss.js
index 5804ee5..ac44b44 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -699,7 +699,7 @@ function hotkey_handler(e) {
             return false;
          }
 
-         if (keycode == 74 && !shift_key) { // j
+         if (keycode == 75 && !shift_key) { // k
             var rv = dijit.byId("feedTree").getPreviousFeed(
                   getActiveFeedId(), activeFeedIsCat());
 
@@ -708,7 +708,7 @@ function hotkey_handler(e) {
             return;
          }
 
-         if (keycode == 75) { // k
+         if (keycode == 74 && !shift_key) { // j
             var rv = dijit.byId("feedTree").getNextFeed(
                   getActiveFeedId(), activeFeedIsCat());
 

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: key assignments j and k are backwards

Postby fox » 07 Feb 2012, 12:13

You could go one step forward and remap n/p to h/l. :)


Return to “Development”

Who is online

Users browsing this forum: No registered users and 5 guests