diff options
author | June McEnroe <june@causal.agency> | 2018-08-22 01:29:28 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-08-22 01:29:28 -0400 |
commit | 0dbd71e08191204a95116ca5e399e430ea1af7d7 (patch) | |
tree | 43a829f4beba5c9ceea050010464488cfe7dda76 | |
parent | Add C-a and C-x (diff) | |
download | torus-0dbd71e08191204a95116ca5e399e430ea1af7d7.tar.gz torus-0dbd71e08191204a95116ca5e399e430ea1af7d7.zip |
Add F-keys to set shift
-rw-r--r-- | client.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/client.c b/client.c index 6b60cb8..ff1a12c 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); } |