summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py
index 803cbe38..49aaeeab 100644
--- a/src/core.py
+++ b/src/core.py
@@ -124,6 +124,7 @@ class Core(object):
}
self.key_func = {
+
"KEY_PPAGE": self.scroll_page_up,
"KEY_NPAGE": self.scroll_page_down,
"KEY_F(5)": self.rotate_rooms_left,
@@ -604,8 +605,16 @@ class Core(object):
# curses.ungetch(0) # FIXME
while self.running:
char = read_char(self.stdscr)
+ # Special case for M-x where x is a number
+ if char.startswith('M-') and len(char) == 3:
+ try:
+ nb = int(char[2])
+ except:
+ pass
+ else:
+ self.command_win('%s' % nb)
# search for keyboard shortcut
- if char in list(self.key_func.keys()):
+ elif char in list(self.key_func.keys()):
self.key_func[char]()
else:
self.do_command(char)