summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-01-05 10:03:37 +1100
committerMaxime Coste <mawww@kakoune.org>2020-01-05 10:03:37 +1100
commit80ffc4d34f2d6a5ae762abc63315699486dafcbe (patch)
treeaa9aa2cda58b9dd1ec27b6806fa3974f6872ede3 /src
parent7470b22c97e330344bd9c8f73ed022d82146b4b7 (diff)
parente7e728981359adbbd74ccf4dfc0053db0d77cd41 (diff)
Merge remote-tracking branch 'fsub/rxvt'
Diffstat (limited to 'src')
-rw-r--r--src/ncurses_ui.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc
index 7785012c..f93bb6d0 100644
--- a/src/ncurses_ui.cc
+++ b/src/ncurses_ui.cc
@@ -640,7 +640,7 @@ Optional<Key> NCursesUI::get_next_key()
else
return {};
}
- if (c < 0x40 or c > 0x7e)
+ if (c != '$' and (c < 0x40 or c > 0x7e))
return {};
auto parse_mask = [](int mask) {
@@ -678,6 +678,13 @@ Optional<Key> NCursesUI::get_next_key()
switch (c)
{
+ case '$':
+ switch (params[0])
+ {
+ case 23: case 24:
+ return Key{Key::Modifiers::Shift, Key::F11 + params[0] - 23}; // rxvt style
+ }
+ return {};
case 'A': return masked_key(Key::Up);
case 'B': return masked_key(Key::Down);
case 'C': return masked_key(Key::Right);
@@ -705,6 +712,14 @@ Optional<Key> NCursesUI::get_next_key()
return masked_key(Key::F6 + params[0] - 17);
case 23: case 24:
return masked_key(Key::F11 + params[0] - 23);
+ case 25: case 26:
+ return Key{Key::Modifiers::Shift, Key::F3 + params[0] - 25}; // rxvt style
+ case 28: case 29:
+ return Key{Key::Modifiers::Shift, Key::F5 + params[0] - 28}; // rxvt style
+ case 31: case 32:
+ return Key{Key::Modifiers::Shift, Key::F7 + params[0] - 31}; // rxvt style
+ case 33: case 34:
+ return Key{Key::Modifiers::Shift, Key::F9 + params[0] - 33}; // rxvt style
}
return {};
case 'u':