diff options
author | marik <marik@marik.com> | 2022-02-17 15:56:02 +0600 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-03-02 11:38:36 +0000 |
commit | b0f80f965480994d9218fb37e5de38e95b89c2a6 (patch) | |
tree | 3090c9634dc18b9a7f29b2161690a540d4a491d2 /deluge/ui | |
parent | f9ca3932a8c0487596a37505e4817253e909d6b9 (diff) | |
download | deluge-b0f80f965480994d9218fb37e5de38e95b89c2a6.tar.gz deluge-b0f80f965480994d9218fb37e5de38e95b89c2a6.tar.bz2 deluge-b0f80f965480994d9218fb37e5de38e95b89c2a6.zip |
[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
Diffstat (limited to 'deluge/ui')
-rw-r--r-- | deluge/ui/console/modes/addtorrents.py | 4 | ||||
-rw-r--r-- | deluge/ui/console/modes/eventview.py | 4 | ||||
-rw-r--r-- | deluge/ui/console/modes/torrentdetail.py | 4 | ||||
-rw-r--r-- | deluge/ui/console/modes/torrentlist/torrentview.py | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/deluge/ui/console/modes/addtorrents.py b/deluge/ui/console/modes/addtorrents.py index 0486099a9..217b63d85 100644 --- a/deluge/ui/console/modes/addtorrents.py +++ b/deluge/ui/console/modes/addtorrents.py @@ -517,9 +517,9 @@ class AddTorrents(BaseMode): self.last_mark = self.cursel elif chr(c) == 'j': - self.scroll_list_up(1) - elif chr(c) == 'k': self.scroll_list_down(1) + elif chr(c) == 'k': + self.scroll_list_up(1) elif chr(c) == 'M': if self.last_mark != -1: if self.last_mark > self.cursel: diff --git a/deluge/ui/console/modes/eventview.py b/deluge/ui/console/modes/eventview.py index 6526023fb..b6e63b019 100644 --- a/deluge/ui/console/modes/eventview.py +++ b/deluge/ui/console/modes/eventview.py @@ -97,9 +97,9 @@ class EventView(BaseMode): elif c == curses.KEY_END: self.offset += num_events elif c == ord('j'): - self.offset -= 1 - elif c == ord('k'): self.offset += 1 + elif c == ord('k'): + self.offset -= 1 if self.offset <= 0: self.offset = 0 diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py index eab9dfef1..16bd08a5c 100644 --- a/deluge/ui/console/modes/torrentdetail.py +++ b/deluge/ui/console/modes/torrentdetail.py @@ -1016,8 +1016,8 @@ class TorrentDetail(BaseMode, PopupsHandler): elif c == ord('h'): self.push_popup(MessagePopup(self, 'Help', HELP_STR, width_req=0.75)) elif c == ord('j'): - self.file_list_up() - elif c == ord('k'): self.file_list_down() + elif c == ord('k'): + self.file_list_up() self.refresh() diff --git a/deluge/ui/console/modes/torrentlist/torrentview.py b/deluge/ui/console/modes/torrentlist/torrentview.py index fbd029983..1ce509788 100644 --- a/deluge/ui/console/modes/torrentlist/torrentview.py +++ b/deluge/ui/console/modes/torrentlist/torrentview.py @@ -464,9 +464,9 @@ class TorrentView(InputKeyHandler): ) self.torrentlist.refresh() elif c == ord('j'): - affected_lines = self._scroll_up(1) - elif c == ord('k'): affected_lines = self._scroll_down(1) + elif c == ord('k'): + affected_lines = self._scroll_up(1) elif c == ord('m'): self.mark_unmark(self.cursel) affected_lines = [self.cursel] |