summaryrefslogtreecommitdiff
path: root/src/keyboard_die.c
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2020-04-14 06:22:58 -0500
committerepoch <epoch@thebackupbox.net>2020-04-14 06:22:58 -0500
commit7cedbf16a4c71b8a5ba0646c35fd03f20ddbda24 (patch)
tree8ad5482a3c0a23724aa1f597a4ab8751c4fbf20b /src/keyboard_die.c
parent4a7cc1a5dee7ef1065f232cbd1b5e51c399dd920 (diff)
downloadhackvr-7cedbf16a4c71b8a5ba0646c35fd03f20ddbda24.tar.gz
hackvr-7cedbf16a4c71b8a5ba0646c35fd03f20ddbda24.zip
removed a couple things in keyboard event code that was initializing the keyboard
Diffstat (limited to 'src/keyboard_die.c')
-rw-r--r--src/keyboard_die.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/keyboard_die.c b/src/keyboard_die.c
index e043db4..5a52879 100644
--- a/src/keyboard_die.c
+++ b/src/keyboard_die.c
@@ -6,7 +6,8 @@
#include "keyboard.h"
-#define KBDEV "/dev/input/event0"
+//#define KBDEV "/dev/input/event0"
+#define KBDEV "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
int kbfd = -1;
@@ -37,15 +38,6 @@ hvk_t get_keyboard_event() {
struct input_event ie;
int l;
memset(&ie,0,sizeof(ie));
- if(kbfd == -1) {
- kbfd=open(KBDEV,O_RDWR);
- //probably not needed anymore
- //fcntl(kbfd,F_SETFL,O_NONBLOCK);
- }
- if(kbfd == -1) {
- fprintf(stderr,"# keyboard shit fucked up. probably permissions error.\n");
- return 1;
- }
if((l=read(kbfd,&ie,sizeof(ie))) > 0) {
if(ie.type == 1) {
fprintf(stderr,"# value: %d code: %d type: %d\n",ie.value,ie.code,ie.type);