Made 'Esc' exit AddTorrents and allowed scrolling with j/k

This commit is contained in:
Asmageddon 2012-07-20 18:24:44 +02:00
parent bd13457f33
commit 5927f2fa30
1 changed files with 7 additions and 0 deletions

View File

@ -554,6 +554,9 @@ class AddTorrents(BaseMode, component.Component):
# Enter Key
elif c == curses.KEY_ENTER or c == 10:
self._perform_action()
#Escape
elif c == 27:
self.back_to_overview()
else:
if c > 31 and c < 256:
if chr(c) == 'h':
@ -580,6 +583,10 @@ class AddTorrents(BaseMode, component.Component):
self.marked.add(s)
self.last_mark = self.cursel
elif chr(c) == 'j':
self.scroll_list_up(1)
elif chr(c) == 'k':
self.scroll_list_down(1)
elif chr(c) == 'M':
if self.last_mark != -1:
if self.last_mark > self.cursel: