[mythtv] 2.6 IR Keyboards

Darren Hart darren at dvhart.com
Sat Jun 19 11:45:14 EDT 2004


On Sat, 2004-06-19 at 08:18, J. Donavan Stanley wrote:
> Darren Hart wrote:
> 
> >2) The current hardcoded maps use KEY_* event codes.  IMO people don't
> >think of remotes as keyboards, the closest parallel would be more like a
> >joystick.  My remote has keys that are bound to keyboard keys that I
> >don't like, but unless I recompile the kernel I can't really change
> >that.  It seems to me that remotes should use BTN_* event codes rather
> >than KEY_* codes.
> >  
> >
> You might think of your remote as a joystick but most people think of it 
> as a remote.  The closest parallel to the functionality of a remote *is* 
> a keyboard.

The only reason I mentioned joystick is because the input event system
has keyboard (KEY_*) and joystick (BTN_*) codes, there are no REMOTE_*
codes.  Please correct me if I am mistaken here, but I didn't see
anything that said otherwise in event.h.

> As for not liking the keybinding that's generated when you 
> press a remote button...  What difference does it make as long as you 
> can tell your app "when X is press do Y"?

If all the buttons were defined in ir-common.c for every remote
compatible with that receiver and apps were configurable enough to allow
for that, then you're right, it wouldn't matter.  Unfortunately storing
that many keytabs in the kernel itself doesn't seem reasonable to me. 
Runtime loadable keytabs would provide for a far more flexible system.

There are also some buttons on the remotes that don't have corresponding
KEY_* codes, such as BLUE, YELLOW, etc. so we'll be forced to use some
of the BTN_* codes anyway and apps will still have to support the input
event system.  Also the default ir-common.c keytab maps the 10 number
keys on the remote to KEY_KP[0-9].  This means that your remote behaves
differently based on whether or not num-lock is on on the keyboard,
which IMO is very non-intuitive.  These are some of the reasons that I
think the BTN_* codes would be more appropriate for remotes than the
KEY_* codes.  I believe most people would expect to be able to configure
the buttons to perform certain actions, rather than having X intercept
them if it knows what they are.

Thoughts / comments?

--Darren

> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> 
> 


More information about the mythtv-dev mailing list