|
From: Anders T. <aer...@gm...> - 2012-11-15 19:53:46
|
On 2012-11-15 03:44, Mark DM wrote: > I see that there seems to be some issues with getting LIRC to > recognize long keypresses , however this seems to also baffle me as to > why . see http://forum.xbmc.org/showthread.php?tid=115023 > > I have a Creative Labs Sound Blaster Audigy 2 NX . I only use the IR > functionality. > > When I launch irw and hit a key I see this > 000000000000001f 00 ok RM-1500 > with "ok" corresponding to the key pressed. > > Now with irw if I press and hold a key for about 3 seconds I see this > 000000000000001f 00 ok RM-1500 > 000000000000001f 01 ok RM-1500 > 000000000000001f 02 ok RM-1500 > 000000000000001f 03 ok RM-1500 > 000000000000001f 04 ok RM-1500 > 000000000000001f 05 ok RM-1500 > 000000000000001f 06 ok RM-1500 > 000000000000001f 07 ok RM-1500 > 000000000000001f 08 ok RM-1500 > 000000000000001f 09 ok RM-1500 > 000000000000001f 0a ok RM-1500 > 000000000000001f 0b ok RM-1500 > Clearly the entry before "ok" corresponds to the time the button was pressed. > > My question is therefore very simple..... > > Since we can now use simply "ok" to identify that the "ok" button was > pressed, why can we not identify a duration by saying instead of "ok" > we say , "0b ok" meaning a three second button press would yield a > specific behavior? I see no issue in making this an option , > especially when the button does not conflict with another use. An > example would be when XBMC is not running and I want to long press > "ok" or "0b ok" to start XBMC, but that does not mean I want to launch > XBMC when the remote falls on the floor and that button gets pressed, > or when the cat steps on it while chasing a fly. In fact it coul;d > probably be implemented while leaving compatibility with older > configuration files as only those needing long keypresses would > require the additional "0b" > > Each non- "00" event generates a "REP" style repeat event when fed into the input subsystem. I've configured mouse emulation using this to make the mouse accelerate when I press and hold a direction button. X's mouse stuff require repeats to be distinguished from a batch of single events. I guess you can write an input listener which does something if the repeats are 11 or so.. /Anders |