From e166c6a9867709ce4007906febb719a5d297e75e Mon Sep 17 00:00:00 2001 From: epoch Date: Sat, 7 Mar 2020 05:42:30 -0600 Subject: added turning keys if you insist on not using a mouse --- src/keyboard.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/keyboard.c b/src/keyboard.c index 50efd88..c0e8ed9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -75,7 +75,16 @@ void keyboard_event_handler() { selfcommand(line); } //don't forget to add the rotation keys. - + if(keyboard_map[HVK_TURNLEFT] == 1) { + keyboard_map[HVK_TURNLEFT]=0; + snprintf(line,sizeof(line)-1,"%s rotate +0 +-%d +0\n",global.user,5); + selfcommand(line); + } + if(keyboard_map[HVK_TURNRIGHT] == 1) { + keyboard_map[HVK_TURNRIGHT]=0; + snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,5); + selfcommand(line); + } // ^ here if(keyboard_map[HVK_DEBUG]==1) { keyboard_map[HVK_DEBUG]=0;//make sure we don't hold-down toggle it. just on press. -- cgit v1.2.3