diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-08-07 23:20:21 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-08-07 23:20:21 +0200 |
commit | 3ef9228211df46ada9bb5b851682a9c7d833de56 (patch) | |
tree | 3bf40a1f43c97577f5cf317c937f55023c0bb186 /src/keyboard.py | |
parent | 0e2bba640e1ffcfaa7ce4bc6782f24b0f10b8c08 (diff) | |
download | poezio-3ef9228211df46ada9bb5b851682a9c7d833de56.tar.gz poezio-3ef9228211df46ada9bb5b851682a9c7d833de56.tar.bz2 poezio-3ef9228211df46ada9bb5b851682a9c7d833de56.tar.xz poezio-3ef9228211df46ada9bb5b851682a9c7d833de56.zip |
Continuation keys (like after M-j or Ctrl-c) are handled without blocking
Diffstat (limited to 'src/keyboard.py')
-rwxr-xr-x | src/keyboard.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 |