tsprlng / nad-link

NAD Link (aka NEC remote control protocol) control script for Raspberry Pi
10 stars 3 forks source link

XBMC interferes with capturing keyboard events #3

Open tsprlng opened 8 years ago

tsprlng commented 8 years ago

Since XBMC very annoyingly does an EVIOCGRAB on the same /dev/input/event1 device I'm trying to use (i.e. it insists on exclusive access to keyboard events), the keyboard daemon script cannot be used at the same time as XBMC. It simply doesn't work.

This is very annoying!

In order to work around this, I'll have to modify the script to take the exclusive access before XBMC can (and tediously ensure that init always starts it first). I'll also have to manually collect a bunch more events (play/pause etc) and convert them to RPC calls to XBMC – as once my script has exclusive access, XBMC won't see those key presses any more!

tsprlng commented 8 years ago

After adding in the EVIOCGRAB call in the daemon, It appears that this (as expected) blocks XBMC from seeing some keystrokes – but bizarrely not all.

play/pause is blocked volume keys are blocked backspace is blocked 'clear' on the numpad (possibly escape?) still works numbers still work arrows still work

weird. why?

tsprlng commented 8 years ago

This particular bluetooth remote appears as two separate devices, one typing "media" keys and the other typing the normal keys. This is lucky for me as it makes it somewhat usable with this half-arsed implementation.