diff options
author | Craig de Stigter <craig.destigter@koordinates.com> | 2018-06-06 09:57:54 +1200 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2018-06-07 22:03:35 +0200 |
commit | 1f5e19756270441d2a2821d35af2de91e7d6a52a (patch) | |
tree | 8f3f002812438220ee341d0989649162c48ae753 | |
parent | e05d92aab30b33e68af4a82d2df81940c836cf7c (diff) |
Fix Opt+left/right in iterm
Fixes #483
-rw-r--r-- | prompt_toolkit/input/vt100_parser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/prompt_toolkit/input/vt100_parser.py b/prompt_toolkit/input/vt100_parser.py index acdec9a5..8340344e 100644 --- a/prompt_toolkit/input/vt100_parser.py +++ b/prompt_toolkit/input/vt100_parser.py @@ -193,6 +193,11 @@ ANSI_SEQUENCES = { '\x1b[1;3A': (Keys.Escape, Keys.Up), '\x1b[1;3B': (Keys.Escape, Keys.Down), + # Option+left/right on (some?) Macs when using iTerm defaults + # (see issue #483) + '\x1b[1;9D': (Keys.Escape, Keys.Left), + '\x1b[1;9C': (Keys.Escape, Keys.Right), + # Sequences generated by numpad 5. Not sure what it means. (It doesn't # appear in 'infocmp'. Just ignore. '\x1b[E': Keys.Ignore, # Xterm. |