We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bad8ab1 commit aa43e5eCopy full SHA for aa43e5e
src/key_event.cc
@@ -89,6 +89,13 @@ KeySequence::KeySequence(const string& repr) {
89
clear();
90
}
91
92
+static bool is_unescaped_character(const KeyEvent& key_event) {
93
+ int ch = key_event.keycode();
94
+ return key_event.modifier() == 0 &&
95
+ ch >= 0x20 && ch <= 0x7e &&
96
+ ch != '{' && ch != '}';
97
+}
98
+
99
string KeySequence::repr() const {
100
std::ostringstream result;
101
string k;
@@ -97,6 +104,9 @@ string KeySequence::repr() const {
104
if (k.size() == 1) {
105
result << k;
106
107
+ else if (is_unescaped_character(*it)) {
108
+ result << char(it->keycode());
109
+ }
110
else {
111
result << '{' << k << '}';
102
112
0 commit comments