diff options
| author | epoch <epoch@hacking.allowed.org> | 2020-03-07 05:42:30 -0600 | 
|---|---|---|
| committer | epoch <epoch@hacking.allowed.org> | 2020-03-07 05:42:30 -0600 | 
| commit | e166c6a9867709ce4007906febb719a5d297e75e (patch) | |
| tree | e1dd0847afda43012a0627a75dd41f9924c70f20 /src | |
| parent | 7471f9b93b4e7a5b5f07255fcd994fe560940354 (diff) | |
| download | hackvr-e166c6a9867709ce4007906febb719a5d297e75e.tar.gz hackvr-e166c6a9867709ce4007906febb719a5d297e75e.zip | |
added turning keys if you insist on not using a mouse
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 11 | 
1 files changed, 10 insertions, 1 deletions
| 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. | 
