NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
« Previous 1 … 161 162 163 164 165 … 193 Next »
Consistency

 
  • 0 Vote(s) - 0 Average
Consistency
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#11
2005-02-10, 02:29 AM
JasonF thats a good idea, just have to make sure no two buttons have the same keystrokes, currently i only think Red and Rewind have the same ones. have something like
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><keypressActions>
<action name="universal.nexttrack" mapping="skip" />
<action name="universal.prevtrack" mapping="prev" />
<action name="universal.mute" mapping="mute" />
<action name="universal.stop" mapping="stop" />
<action name="universal.mainmenu" mapping="go" />
<action name="universal.pause" mapping="pause" />
<action name="universal.pageup" mapping="yellow" />
<action name="universal.pagedown" mapping="blue" />
</keypressActions>[/QUOTE]
etc for all the universal commands, so they are all set once.
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#12
2005-02-10, 12:29 PM
If I follow your logic, you're suggesting that pressing Pause while in Solitaire (for example) should pause the playing music? I don't use GBPVR for anything but TV, so I didn't know this behavior was expected.

I can see someone wanting or needing to map an action to a remote key that might already be declared globally (i.e., maybe they don't have that many buttons on their particular remote control). It would just need to be understood that the &quot;universal&quot; functions will only fire off if the key is not handled by the plugin.

So, in the above example, let's say that someone maps the Pause button to a Solitaire function. Then, while in solitaire, pressing Pause will not pause any playing music. They would have to return to the main menu for that to work.
JasonF
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#13
2005-02-10, 12:39 PM
nah the universal pause,nexttrack,prevtrack will be for the global use of gbpvr, in most causes music. these will also be used in video playback, pause = pause playback, next = next video in playlist etc.

when playlists come into play, it raises the issue of what do you do with &quot;next&quot;? i think that if we, well sub, changes fastforward to replace next, fastforward once = fastforward/short skip. then number + fastforward takes the place that number+skip would use, eg 20 + FF = skip 20mins. that way next/prev can go thru either videos in the playlists or chapters/bookmarks (when they are added), yeah im thinking down the road, dont want to have to redo this later, well sub would have to probably redo this Tongue
next also works with the dvd chapters.

then for the plugins say
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
<keypressActions>
<Plugin name="Solitaire">
<action name="pausegame" mapping="blue" />
<action name="resetgame" mapping="red" />
</Plugin>
</keypressActions>[/QUOTE]
etc.
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#14
2005-02-10, 01:02 PM
Oh, I see where you're going. I'd rather go the easier route with a 1-level XML, sort of like a properties file in Java (if you think in this way, then you see where my inspiration came from).

Each plugin would have a set number of action names that they use, but there's nothing that would prevent two plugins from sharing a single action name (it would be bad practice, nonetheless, but all of your &quot;MY&quot; plugins could share a common &quot;my.exit&quot;, etc).

In this way, the GBPVR.Public object that holds the action/key mappings would not need to worry about parsing to the plugin level--it would simply read in the mappings, and store them in a hashtable (key=actionName, val=keyCode).
JasonF
colin
Offline

Senior Member

Posts: 683
Threads: 39
Joined: Nov 2003
#15
2005-02-10, 01:12 PM
I think JasonF's idea/method would be worth more investigation. I think it allows for greater flexibility but still achieving our goal,

cheers,
Colin.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#16
2005-02-10, 01:28 PM
[b Wrote:Quote[/b] ]I think JasonF's idea/method would be worth more investigation. I think it allows for greater flexibility but still achieving our goal,
now i think about it, so do i.

so we want something like
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><keypressActions>
<action name="nexttrack" mapping="next" />
<action name="prevtrack" mapping="prev" />
<action name="myplugin.mainmenu" mapping="home" />
<action name="anotherplugin.popupmenu" mapping="go" />
</keypressActions>[/QUOTE]

or we could do it this way
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><keypressActions>
<action name="nexttrack" mapping="ctrl-right" />
<action name="prevtrack" mapping="ctrl-left" />
<action name="myplugin.mainmenu" mapping="F1" />
<action name="anotherplugin.popupmenu" mapping="F2" />
</keypressActions>[/QUOTE]
so it works better with a keyboard, and just capture the key command and save it in the config. because ctrl-q for pause, thats annoying for keyboard use. a lot of keyboards have the multimedia keys, perhaps those also could be used this way, not sure if they are processed as keyevents thou... well that can wait for another day.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#17
2005-02-10, 02:26 PM
Slight code tweak:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
<KeyPressActions>
<Action mapping="ctrl-right">Next Track</Action>
<Action mapping="ctrl-left">Previous Track</Action>
<Action mapping="ESC">Main Menu</Action>
<Action plugin="myplugin" mapping="F1">Main Menu</Action>
<Action plugin="anotherplugin" mapping="F2">Popup Menu</Action>
</KeyPressActions>
[/QUOTE]

mapping and plugin are attributes of the Action. The action is actually what the attributes modify. If the plugin attribute isn't specified, it affects all plugins, otherwise it's plugin specific.

So in this case, ESC is the default to get you back to the main menu, otherwise if you are in MyPlugin, you use F1
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#18
2005-02-10, 02:32 PM
yeah but then its not consistent, which we are trying to do.  so how jasonf suggestion we refer to it in the plugin like
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(Key == pluginHelper.Keys["MainMenu"]
returnToMainMenu;
else if(Key == pluginHelper.Keys["MyPlugin.PopupMenu"])
showPopupMenu();
[/QUOTE]
etc.

also that way if one developers uses the same buttons for each plugin, eg
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(Key == pluginHelper.Keys["MySeries.PopupMenu"]
showPopupMenu();
else if(Key == pluginHelper.Keys["MySeries.CycleViews"]
nextView();
else if(Key == pluginHelper.Keys["MySeries.CycleSortMethod"]
nextSort();
[/QUOTE]



jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#19
2005-02-10, 02:33 PM
I'm still pushing for a 2-part mapping:

1. Map the remote keys to actual keypresses. Name each mapping according to the actual key on the remote. This creates a remote-specific file, so there's no confusion as to what the &quot;GO&quot; or &quot;RED&quot; keys are and what they individually map to.

Perhaps there could be another layer, if only an additional attribute, that can be used to declare remote-specific keys to well-known keys (so even if a remote doesn't have a &quot;RED&quot; key, we can still provide a way to use another key whenever &quot;RED&quot; is needed).

2. Map the plugin actions to remote mapping names defined in step 1.

However, distribution will be an issue. The plugin designer will need to supply default action mappings, but they will probably be specified in terms of the Hauppage remote. The user will probably need to go through a mapping exercise if they are not using the Hauppage remote.
JasonF
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#20
2005-02-10, 02:37 PM
also users could submit a remote.xml file like they do with language.xml file, which will have all the buttons mapped out to each remote.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): « Previous 1 2 3 4 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode