aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorwustho <benawiadha@gmail.com>2020-02-17 06:40:36 +0700
committerwustho <benawiadha@gmail.com>2020-02-17 06:40:36 +0700
commit252b5e27d0a50c48a8da4382d5eb19b0faac1cde (patch)
tree6ec7e34f9b6fd0e331324d30bac768999f8b35d5 /epy.py
parent910a0f38562def9eb5023f33fa3c18cb5488c592 (diff)
downloadepy-252b5e27d0a50c48a8da4382d5eb19b0faac1cde.tar.gz
Added global variable: WINKEYS.
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/epy.py b/epy.py
index aa8f955..c70d54a 100755
--- a/epy.py
+++ b/epy.py
@@ -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):