add curses texpad del, home, end handlers
This commit is contained in:
parent
cd501bdc1e
commit
2c5c87f555
2
setup.py
2
setup.py
|
@ -13,7 +13,7 @@ def main():
|
||||||
long_description='SSH connection and aliases manager with curses and command line interface',
|
long_description='SSH connection and aliases manager with curses and command line interface',
|
||||||
long_description_content_type='text/x-rst',
|
long_description_content_type='text/x-rst',
|
||||||
license='DWTWL 2.55',
|
license='DWTWL 2.55',
|
||||||
version='1.09.5',
|
version='1.09.6',
|
||||||
py_modules=['sshch'],
|
py_modules=['sshch'],
|
||||||
scripts=['sshch/sshch'],
|
scripts=['sshch/sshch'],
|
||||||
keywords='sshch ssh aliases curses manager',
|
keywords='sshch ssh aliases curses manager',
|
||||||
|
|
12
sshch/sshch
12
sshch/sshch
|
@ -22,7 +22,7 @@ from curses import textpad, panel
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
# https://gitlab.com/zlax/sshch
|
# https://gitlab.com/zlax/sshch
|
||||||
version = "1.09.5"
|
version = "1.09.6"
|
||||||
# expand groups by default
|
# expand groups by default
|
||||||
expand_default = True
|
expand_default = True
|
||||||
# path to conf dir and file, default: ~/.config/sshch.conf
|
# path to conf dir and file, default: ~/.config/sshch.conf
|
||||||
|
@ -360,10 +360,16 @@ class CursesTextpadEsc(Exception):
|
||||||
|
|
||||||
|
|
||||||
def CursesTextpadConfirm(value):
|
def CursesTextpadConfirm(value):
|
||||||
if value == 10:
|
if value == 10: # Enter
|
||||||
value = 7
|
value = 7
|
||||||
if value == 27:
|
elif value == 27: # Esc
|
||||||
raise CursesTextpadEsc()
|
raise CursesTextpadEsc()
|
||||||
|
elif value == curses.KEY_DC: # Del
|
||||||
|
value = curses.ascii.EOT
|
||||||
|
elif value == curses.KEY_HOME: # Home
|
||||||
|
value = curses.ascii.SOH
|
||||||
|
elif value == curses.KEY_END: # End
|
||||||
|
value = curses.ascii.ENQ
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue