about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-22 01:29:28 -0400
committerJune McEnroe <june@causal.agency>2018-08-22 01:29:28 -0400
commitb8fe8dc9f4826402090b2358f5e24d099ce5651d (patch)
tree18edd2ff026923f8e73dcd00598b408326a92ec7
parentAdd C-a and C-x (diff)
downloadtorus-b8fe8dc9f4826402090b2358f5e24d099ce5651d.tar.gz
torus-b8fe8dc9f4826402090b2358f5e24d099ce5651d.zip
Add F-keys to set shift
Diffstat (limited to '')
-rw-r--r--client.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/client.c b/client.c
index 80d1ad9..7795c7d 100644
--- a/client.c
+++ b/client.c
@@ -259,12 +259,18 @@ static void inputNormal(bool keyCode, wchar_t ch) {
 			break; case KEY_RIGHT: clientMove( 1,  0);
 			break; case KEY_UP:    clientMove( 0, -1);
 			break; case KEY_DOWN:  clientMove( 0,  1);
+
+			break; case KEY_F(1): input.shift = 0x00;
+			break; case KEY_F(2): input.shift = 0xC0;
+			break; case KEY_F(3): input.shift = 0xA0;
+			break; case KEY_F(4): input.shift = 0x70;
+			break; case KEY_F(5): input.shift = 0x40;
 		}
 		return;
 	}
 
 	switch (ch) {
-		break; case ESC: input.mode = MODE_NORMAL;
+		break; case ESC: input.mode = MODE_NORMAL; input.shift = 0;
 		break; case 'q': endwin(); exit(EX_OK);
 
 		break; case 'h': clientMove(-1,  0);
@@ -320,9 +326,6 @@ static void inputNormal(bool keyCode, wchar_t ch) {
 			clientPut(tile.colors[cellY][cellX], tile.cells[cellY][cellX] - 1);
 		}
 
-		break; case CTRL('P'): input.shift -= 0x20;
-		break; case CTRL('N'): input.shift += 0x20;
-
 		break; case 'i': insertMode(1, 0);
 		break; case 'a': clientMove(1, 0); insertMode(1, 0);
 	}
ver-highlight'> 2020-03-03Remove setoptJune McEnroe 2020-03-03Use getopts in shell scriptsJune McEnroe WTF why did no one tell me about this? 2020-02-27Style %T outside of Rs in italicJune McEnroe 2020-02-26Add Fierce Femmes and Notorious LiarsJune McEnroe 2020-02-23Add This Is How You Lose the Time WarJune McEnroe 2020-02-22Add See Ya LaterJune McEnroe 2020-02-20Remove wiki scriptJune McEnroe Wikipedia seems to have removed the one-sentence extracts from the opensearch results. Too bad. It's not a wiki script, what we need is a command that fetches single-sentence summaries of articles on Wikipedia. 2020-02-19Add The Obelisk GateJune McEnroe 2020-02-17Add Four Tet — HandsJune McEnroe One from the cafe that caught my attention. 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe Apparently sometimes it didn't like receiving its own internal storage to parse again. Understandable. 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe Wow. One of the best I've read. 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe Broke out LDLIBS for each bin, and made everything more uniform. 2020-01-28Change scout sensitivity to 1.4June McEnroe idk it seems to work. 2020-01-28Import shows.txtJune McEnroe