diff options
Diffstat (limited to 'src/fe-common/core/keyboard.c')
-rw-r--r-- | src/fe-common/core/keyboard.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index 00454401..bec1502e 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -292,12 +292,18 @@ static int expand_key(const char *key, GSList **out) } last_hyphen = !last_hyphen; } else if (*key == '^') { + expand_out_char(*out, '^'); + /* ctrl-code */ - if (key[1] != '\0') + if (key[1] != '\0' && key[1] != '-') { key++; + expand_out_char(*out, *key); + } + else { + /* escaped syntax for ^, see gui-readline.c */ + expand_out_char(*out, '-'); + } - expand_out_char(*out, '^'); - expand_out_char(*out, *key); expand_out_char(*out, '-'); last_hyphen = FALSE; /* optional */ } else if (last_hyphen && i_isalpha(*key)) { |