about summary refs log tree commit diff homepage
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-23 15:33:56 -0400
committerJune McEnroe <june@causal.agency>2018-08-23 15:33:56 -0400
commitf919c5170bfb43aff48050331fd3054c8de52fa9 (patch)
treee9f0e6d8796189d146dd2133f331b93509dd958d /client.c
parentImplement I, directional insert (diff)
downloadtorus-f919c5170bfb43aff48050331fd3054c8de52fa9.tar.gz
torus-f919c5170bfb43aff48050331fd3054c8de52fa9.zip
Add g for flip
Diffstat (limited to '')
-rw-r--r--client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/client.c b/client.c
index e110686..239ae8c 100644
--- a/client.c
+++ b/client.c
@@ -179,6 +179,11 @@ static void clientMove(int8_t dx, int8_t dy) {
 	clientMessage(msg);
 }
 
+static void clientFlip(void) {
+	struct ClientMessage msg = { .type = CLIENT_FLIP };
+	clientMessage(msg);
+}
+
 static void clientPut(uint8_t color, uint8_t cell) {
 	struct ClientMessage msg = {
 		.type = CLIENT_PUT,
@@ -277,6 +282,7 @@ static void inputNormal(wchar_t ch) {
 		break; case ESC: input.mode = MODE_NORMAL; input.shift = 0;
 		break; case 'q': endwin(); exit(EX_OK);
 
+		break; case 'g': clientFlip();
 		break; case 'h': clientMove(-1,  0);
 		break; case 'l': clientMove( 1,  0);
 		break; case 'k': clientMove( 0, -1);