Model keyCtrl like keyMeta

weechat-hashes
C. McEnroe 2020-02-04 20:56:27 -05:00
parent 55757243f4
commit 104b3ffd4f
1 changed files with 5 additions and 3 deletions

8
ui.c
View File

@ -497,9 +497,9 @@ static void keyMeta(wchar_t ch) {
} }
} }
static void keyChar(wchar_t ch) { static void keyCtrl(wchar_t ch) {
switch (ch) { switch (ch) {
break; case CTRL(L'L'): clearok(curscr, true); break; case L'L': clearok(curscr, true);
} }
} }
@ -515,8 +515,10 @@ void uiRead(void) {
continue; continue;
} else if (meta) { } else if (meta) {
keyMeta(ch); keyMeta(ch);
} else if (iswcntrl(ch)) {
keyCtrl(ch ^ L'@');
} else { } else {
keyChar(ch); // TODO: Insert.
} }
meta = false; meta = false;
} }