[Console] Swap j and k key's behavior to fit vim mode
There is a problem in the Deluge's Console UI. This UI supports the j and k keys as up and down, but for some reason they are inverted. This commit inverts back the behaviour of j and k in several places. Resolves: https://dev.deluge-torrent.org/ticket/3483 Closes: https://github.com/deluge-torrent/deluge/pull/377
This commit is contained in:
parent
f9ca3932a8
commit
b0f80f9654
|
@ -517,9 +517,9 @@ class AddTorrents(BaseMode):
|
||||||
|
|
||||||
self.last_mark = self.cursel
|
self.last_mark = self.cursel
|
||||||
elif chr(c) == 'j':
|
elif chr(c) == 'j':
|
||||||
self.scroll_list_up(1)
|
|
||||||
elif chr(c) == 'k':
|
|
||||||
self.scroll_list_down(1)
|
self.scroll_list_down(1)
|
||||||
|
elif chr(c) == 'k':
|
||||||
|
self.scroll_list_up(1)
|
||||||
elif chr(c) == 'M':
|
elif chr(c) == 'M':
|
||||||
if self.last_mark != -1:
|
if self.last_mark != -1:
|
||||||
if self.last_mark > self.cursel:
|
if self.last_mark > self.cursel:
|
||||||
|
|
|
@ -97,9 +97,9 @@ class EventView(BaseMode):
|
||||||
elif c == curses.KEY_END:
|
elif c == curses.KEY_END:
|
||||||
self.offset += num_events
|
self.offset += num_events
|
||||||
elif c == ord('j'):
|
elif c == ord('j'):
|
||||||
self.offset -= 1
|
|
||||||
elif c == ord('k'):
|
|
||||||
self.offset += 1
|
self.offset += 1
|
||||||
|
elif c == ord('k'):
|
||||||
|
self.offset -= 1
|
||||||
|
|
||||||
if self.offset <= 0:
|
if self.offset <= 0:
|
||||||
self.offset = 0
|
self.offset = 0
|
||||||
|
|
|
@ -1016,8 +1016,8 @@ class TorrentDetail(BaseMode, PopupsHandler):
|
||||||
elif c == ord('h'):
|
elif c == ord('h'):
|
||||||
self.push_popup(MessagePopup(self, 'Help', HELP_STR, width_req=0.75))
|
self.push_popup(MessagePopup(self, 'Help', HELP_STR, width_req=0.75))
|
||||||
elif c == ord('j'):
|
elif c == ord('j'):
|
||||||
self.file_list_up()
|
|
||||||
elif c == ord('k'):
|
|
||||||
self.file_list_down()
|
self.file_list_down()
|
||||||
|
elif c == ord('k'):
|
||||||
|
self.file_list_up()
|
||||||
|
|
||||||
self.refresh()
|
self.refresh()
|
||||||
|
|
|
@ -464,9 +464,9 @@ class TorrentView(InputKeyHandler):
|
||||||
)
|
)
|
||||||
self.torrentlist.refresh()
|
self.torrentlist.refresh()
|
||||||
elif c == ord('j'):
|
elif c == ord('j'):
|
||||||
affected_lines = self._scroll_up(1)
|
|
||||||
elif c == ord('k'):
|
|
||||||
affected_lines = self._scroll_down(1)
|
affected_lines = self._scroll_down(1)
|
||||||
|
elif c == ord('k'):
|
||||||
|
affected_lines = self._scroll_up(1)
|
||||||
elif c == ord('m'):
|
elif c == ord('m'):
|
||||||
self.mark_unmark(self.cursel)
|
self.mark_unmark(self.cursel)
|
||||||
affected_lines = [self.cursel]
|
affected_lines = [self.cursel]
|
||||||
|
|
Loading…
Reference in New Issue