File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ static int openInputDevice(lua_State *L) {
71
71
int childpid ;
72
72
int fd = findFreeFdSlot ();
73
73
if (fd == -1 ) return luaL_error (L , "no free slot for new input device <%s>" , inputdevice );
74
+ char * ko_dont_grab_input = getenv ("KO_DONT_GRAB_INPUT" );
75
+
74
76
75
77
#ifdef POCKETBOOK
76
78
int inkview_events = luaL_checkint (L , 2 );
@@ -104,7 +106,10 @@ static int openInputDevice(lua_State *L) {
104
106
} else {
105
107
inputfds [fd ] = open (inputdevice , O_RDONLY | O_NONBLOCK , 0 );
106
108
if (inputfds [fd ] != -1 ) {
107
- ioctl (inputfds [fd ], EVIOCGRAB , 1 );
109
+ if (ko_dont_grab_input == NULL ) {
110
+ ioctl (inputfds [fd ], EVIOCGRAB , 1 );
111
+ }
112
+
108
113
/* prevent background command started from exec call from grabbing
109
114
* input fd. for example: wpa_supplicant. */
110
115
fcntl (inputfds [fd ], F_SETFD , FD_CLOEXEC );
You can’t perform that action at this time.
0 commit comments