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 | b8fe8dc9f4826402090b2358f5e24d099ce5651d (patch) | |
tree | 18edd2ff026923f8e73dcd00598b408326a92ec7 | |
parent | Add C-a and C-x (diff) | |
download | torus-b8fe8dc9f4826402090b2358f5e24d099ce5651d.tar.gz torus-b8fe8dc9f4826402090b2358f5e24d099ce5651d.zip |
Add F-keys to set shift
Diffstat (limited to '')
-rw-r--r-- | client.c | 11 |
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); } |