[mythtv-users] Remotes, irxevent and menu navigation

Tako Schotanus quintesse at palacio-cristal.com
Tue Sep 2 11:26:57 EDT 2003


Right now I can think of two scenarios:

1) make a list of context sensitive Key -> Action mappings and in the
rest of MythTV change all the code that handles key presses into
handling actions. The context sensitive part would be needed to be able
to map a Key to more than one Action (Key_LeftArrow can be both
Action_MenuLeft and Action_FastForward).

2) make a flat list of Key -> Action mappings where duplicates are
allowed (again Key_LeftArrow can be both Action_MenuLeft and
Action_FastForward). The problem now is that there isn't a one on one
conversion between Keys and Actions. This would mean that all the code
that handles key presses would have to be converted to actively check if
a certain action is currently active, it would be more of a Poll instead
of Push model.

Code like this:

	int action = determineAction(keyPressed)
	switch (action) {
		case ACTION_MENULEFT:
			// Move menu "cursor" left
		case ACTION_MENURIGTH:
			// Move menu "cursor" right
		case ACTION_SELECT:
			// Activate currently selected menu item
	}

wouldn't be possible anymore but would have to be rewritten like:

	if (isAction(keyPressed, ACTION_MENULEFT)) {
		// Move menu "cursor" left
	} else if (isAction(keyPressed, ACTION_MENULEFT)) {
		// Move menu "cursor" right
	} else if (isAction(keyPressed, ACTION_MENULEFT)) {
		// Activate currently selected menu item
	}

BTW: This example uses constants to distinguish actions, but they could
just as well be strings fo course, removing the need to register all
possible actions in some central header file.

Any other ideas that could work?


Personally I must say that maybe we should try to find a VERY limited
set of actions and "force" module writers to at least try very hard to
do their job with just those few actions. Now I sometimes wonder why
selecting an item doesn't just pop-up up a window with all possible
actions on the item instead of having to know which keys to press. This
doesn't mean I don't think shortcut keys for people using wireless
keyboards or extensive remote controls aren't usefull, they are very
usefull, but I do think that sometimes things are a bit too difficult
for people using simpler remotes.

Again, any thoughts on this?

Cheers,
 -Tako


> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org 
> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Isaac Richards
> Sent: dinsdag 2 september 2003 8:22
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] Remotes, irxevent and menu navigation
> 
> 
> On Monday 01 September 2003 11:20 pm, Rob Nielsen wrote:
> > The best option I can see would be to allow the keys to be 
> configurable
> > so you would have a file or database table that maps keypresses to
> > actions like 'Volume Up' or 'Exit' in myth.
> 
> That would be ideal, of course.  It's been discussed several 
> times on the 
> lists, but nothing ever really came of it aside from a 
> half-done patch that 
> didn't really do things properly which the author never got 
> around to fixing.
> 
> Isaac
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 



More information about the mythtv-users mailing list