NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 48 49 50 51 52 … 93 Next »
Keymapping what is it for exactly?

 
  • 0 Vote(s) - 0 Average
Keymapping what is it for exactly?
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#1
2006-11-19, 01:09 AM
I am progressing along quite nicely on my first plugin and I have decided that I should start to tidy up how much junk I am throwing out to the gbpvr.exe.log

OK I see many instances similar to the item below:
No key mapping found for: UP

I also notice that for many of the other plugins that they declare specific keymaps, example:

Loading key mapping: C:\Program Files\devnz\gbpvr\KeyMappings\mainmenu.xml
Adding: Return MENU_ENTER
Adding: Escape MENU_ESCAPE
Adding: Up MENU_UP
Adding: Down MENU_DOWN
Adding: Left MENU_VOLUME_DOWN
Adding: Right MENU_VOLUME_UP
Adding: Home MENU_HOME
Adding: ^I MENU_INSET_FULLSCREEN
Adding: ^O MENU_TOGGLE_MONITOR

This stops the aforementing complaining messages.

My problem is I dont understand the value of the keymapping as the plugin works fine without it! Can someone please explain the benefit I am missing out from and possible point me to an example of the best practise way to implement the key mapping in code.

Many Thanks
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#2
2006-11-19, 02:22 AM
For the most part, people dont need to ever change key mappings, but there in case someone needs this ability (for example - due to limitations of their remote, or personal preference, etc).

Sometimes there are more keys mappings than there are buttons on the remote. For example, the main menu has a key for ejecting/retracting the DVD tray. Keymappings exist for this, but not mapped to a remote keystroke by default - some users may really want this function available via their remote, so can easily change the keymapping xml to make the function available on a key their remote uses.

In code you just do the following

member variable:
Code:
private KeyCommandHelper keyHelper;

construction, or initialisation function:
Code:
keyHelper = new KeyCommandHelper("FMRadio.xml");

OnKeyDown() method:
Code:
switch (keyHelper.KeyMapping(e))
{    
    case "FM_LEFT":
        ...
        break;
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Keymapping issue idkpmiller 7 2,323 2007-01-07, 03:15 PM
Last Post: sub

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

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

Linear Mode
Threaded Mode