summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-04 20:56:27 -0500
committerJune McEnroe <june@causal.agency>2020-02-04 21:00:33 -0500
commit104b3ffd4fe23ab530e728a7ef855cfc7d3c5595 (patch)
tree23bb09d0696c2370d88aedcb8b63f2dbbf98ac47
parentCall inputUpdate when switching windows (diff)
downloadcatgirl-104b3ffd4fe23ab530e728a7ef855cfc7d3c5595.tar.gz
catgirl-104b3ffd4fe23ab530e728a7ef855cfc7d3c5595.zip
Model keyCtrl like keyMeta
Diffstat (limited to '')
-rw-r--r--ui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui.c b/ui.c
index 172120b..8f813b4 100644
--- a/ui.c
+++ b/ui.c
@@ -497,9 +497,9 @@ static void keyMeta(wchar_t ch) {
 	}
 }
 
-static void keyChar(wchar_t ch) {
+static void keyCtrl(wchar_t 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;
 		} else if (meta) {
 			keyMeta(ch);
+		} else if (iswcntrl(ch)) {
+			keyCtrl(ch ^ L'@');
 		} else {
-			keyChar(ch);
+			// TODO: Insert.
 		}
 		meta = false;
 	}
.sh?id=47747ef69449eddc2125804acf3f67e6090f356f&follow=1'>List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe