From 032d2b711bb6a97214403db36ca314154c1bd9c9 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 6 Jun 2013 22:58:29 +0200 Subject: Add a M-k keyboard shortcut to escape the next keyboard shortcut fix #2227 --- src/core.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core.py') diff --git a/src/core.py b/src/core.py index a77868cb..2605aeb6 100644 --- a/src/core.py +++ b/src/core.py @@ -197,6 +197,7 @@ class Core(object): 'M-j': self.go_to_room_number, 'M-D': self.scroll_info_up, 'M-C': self.scroll_info_down, + 'M-k': self.escape_next_key, ######## actions mappings ########## '_bookmark': self.command_bookmark, '_bookmark_local': self.command_bookmark_local, @@ -1326,6 +1327,13 @@ class Core(object): res = keyboard.get_user_input(self.stdscr) return res + def escape_next_key(self): + """ + Tell the Keyboard object that the next key pressed by the user + should be escaped. See Keyboard.get_user_input + """ + keyboard.escape_next_key() + ####################### Commands and completions ############################## def register_command(self, name, func, *, desc='', shortdesc='', completion=None, usage=''): -- cgit v1.2.3