Wednesday, 15 April 2015

linux - "disconnecting" /dev/input/event14 from the tty -



linux - "disconnecting" /dev/input/event14 from the tty -

i bought usb foot switch. has usb id 0c45:7403. linux works fine it, is: if press it, emulates keyboard-press. can simly open /dev/input/event14 , read events it, seems there still "key presses" beingness send tty! how can prevent that?

thanks.

if spend 4 minutes longer googleing, would've found reply yourself! first, open /dev/input/eventx - x 14 in case. run:

int grab = 1; int rc = ioctl(fd, eviocgrab, &grab); if (rc == -1) // failure

from then, until programme stops, own device , no events end @ tty.

linux events usb tty

No comments:

Post a Comment