Add w/s as navigation

This commit is contained in:
ivan 2021-09-22 18:58:18 +03:00
parent 7fa8bdb6f9
commit 032b4b1ab0
1 changed files with 8 additions and 6 deletions

View File

@ -20,7 +20,7 @@ import curses
from curses import textpad, panel
# https://gitlab.com/zlax/sshch
version = "1.08"
version = "1.09"
# expand groups by default
expand_default = True
# path to conf dir and file, default: ~/.config/sshch.conf
@ -491,7 +491,7 @@ def CMDOptions():
def CursesMain():
help_screen = ("".join([" Press:\n",
" 'z'/'x' or arrows - navigation\n",
" 'z'/'x', 'w'/'s' or arrows - navigation\n",
" 'a'/'F2' - add new alias (without spaces)\n",
" 'g'/'F5' - add new group (spaces will be stripped)\n",
" 'e'/'F4' - edit existing alias/group\n",
@ -792,7 +792,8 @@ def CursesMain():
page = page + 1
position = 1 + (max_row * (page - 1))
if key_pressed == curses.KEY_DOWN or key_pressed == ord(
'x') or key_pressed == ord('X'):
'x') or key_pressed == ord('X') or key_pressed == ord(
's') or key_pressed == ord('S'):
if page == 1:
if position < i:
position = position + 1
@ -810,7 +811,8 @@ def CursesMain():
page = page + 1
position = 1 + (max_row * (page - 1))
if key_pressed == curses.KEY_UP or key_pressed == ord(
'z') or key_pressed == ord('Z'):
'z') or key_pressed == ord('Z') or key_pressed == ord(
'w') or key_pressed == ord('W'):
if page == 1:
if position > 1:
position = position - 1