diff options
author | wustho <benawiadha@gmail.com> | 2020-02-17 06:40:36 +0700 |
---|---|---|
committer | wustho <benawiadha@gmail.com> | 2020-02-17 06:40:36 +0700 |
commit | 252b5e27d0a50c48a8da4382d5eb19b0faac1cde (patch) | |
tree | 6ec7e34f9b6fd0e331324d30bac768999f8b35d5 /epy.py | |
parent | 910a0f38562def9eb5023f33fa3c18cb5488c592 (diff) | |
download | epy-252b5e27d0a50c48a8da4382d5eb19b0faac1cde.tar.gz |
Added global variable: WINKEYS.
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -96,6 +96,7 @@ K = { "Help": set(), "SwitchColor": set() } +WINKEYS = set() CFGFILE = "" STATEFILE = "" COLORSUPPORT = False @@ -391,7 +392,7 @@ def text_win(textfunc): y = 0 elif key_textw in K["EndOfCh"]: y = pgend(totlines, padhi) - elif key_textw in {curses.KEY_RESIZE}|K["Help"]|K["ToC"]|K["Metadata"] - key: + elif key_textw in {curses.KEY_RESIZE}|WINKEYS - key: return key_textw pad.refresh(y, 0, 6, 5, rows - 5, cols - 5) key_textw = textw.getch() @@ -472,7 +473,7 @@ def choice_win(listgen): index = 0 elif key_chwin in K["EndOfCh"]: index = totlines - 1 - elif key_chwin in {curses.KEY_RESIZE}|K["Help"]|K["Metadata"]: + elif key_chwin in {curses.KEY_RESIZE}|WINKEYS - key: return key_chwin countstring = "" @@ -525,8 +526,10 @@ def loadstate(): def parse_keys(): + global WINKEYS for i in K.keys(): K[i] = K[i]|{ord(CFG["Keys"][i])} + WINKEYS = K["Metadata"]|K["Help"]|K["ToC"] def savestate(file, index, width, pos, pctg): |