Skip to content

Commit c02cecf

Browse files
authored
Merge pull request #4 from cibinmathew/patch-1
Exit on escape key
2 parents c0aefca + ac38750 commit c02cecf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

icl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ def _handle_keypress(self, pressed_key):
211211
if self.selected_option_index > 0:
212212
self.selected_option_index -= 1
213213

214+
elif pressed_key == 27: # Exit on escape
215+
raise
216+
214217
elif curses.ascii.isprint(pressed_key): # this also needs to be replaced by something.
215218
x,y = curses.getsyx()
216219
self.input_string = self.input_string + str(chr(pressed_key))

0 commit comments

Comments
 (0)