diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4183199ec..de727c9b6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -40,7 +40,7 @@ Notable backwards-incompatible changes Since ``,`` and ``-`` act as separators, there are some cases where they need to be written as ``comma`` and ``minus`` respectively. - To minimize gratuitous breakage, the key argument to ``bind`` is parsed using the old syntax in two cases: - - If the key argument starts with a raw escape character (``\e``). Besides backwards compatibility, these "raw" bindings can be useful for keys that fish can't decode yet. + - If the key argument starts with a raw escape character (``\e``) or ascii control character. Besides backwards compatibility, these "raw" bindings can be useful for keys that fish can't decode yet. - If the key argument consists of exactly two characters, contains none of ``,`` or ``-`` and is not a named key. - Fish no longer supports terminals that fail to ignore OSC or CSI sequences they don't recognize. diff --git a/src/key.rs b/src/key.rs index a05af8f49..69d69a0a4 100644 --- a/src/key.rs +++ b/src/key.rs @@ -238,7 +238,7 @@ pub(crate) fn parse_keys(value: &wstr) -> Result, WString> { && !value.contains(KEY_SEPARATOR) && !KEY_NAMES.iter().any(|(_codepoint, name)| name == value) && value.as_char_slice()[0] != 'F') - || first == '\x1b' + || first == '\x1b' || first < ' ' { // Hack: treat as legacy syntax (meaning: not comma separated) if // 1. it doesn't contain '-' or ',' and is short enough to probably not be a key name.