From 3ef9228211df46ada9bb5b851682a9c7d833de56 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 7 Aug 2014 23:20:21 +0200 Subject: Continuation keys (like after M-j or Ctrl-c) are handled without blocking --- src/keyboard.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/keyboard.py') diff --git a/src/keyboard.py b/src/keyboard.py index 0a1391ea..f88a030c 100755 --- a/src/keyboard.py +++ b/src/keyboard.py @@ -18,6 +18,15 @@ import curses.ascii import logging log = logging.getLogger(__name__) +# A callback that will handle the next key entered by the user. For +# example if the user presses Ctrl+j, we set a callbacks, and the +# next key pressed by the user will be passed to this callback +# instead of the normal process of executing global keybard +# shortcuts or inserting text in the current output. The callback +# is always reset to None afterwards (to resume the normal +# processing of keys) +continuation_keys_callback = None + def get_next_byte(s): """ Read the next byte of the utf-8 char -- cgit v1.2.3