INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to create own key mappings in MC?  (Read 1429 times)

aliciaviola

  • Galactic Citizen
  • ****
  • Posts: 451
How to create own key mappings in MC?
« on: September 14, 2017, 02:02:13 am »

I would like to know how to create own key mappings in MC?

Thanks in advance.

Frank
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to create own key mappings in MC?
« Reply #1 on: September 14, 2017, 02:21:24 pm »

Here's the wiki documentation on how to do this:

https://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts

...and here's a post I made about this a very long time ago that shows the keyboard shortcuts that I was using at that time:

https://yabb.jriver.com/interact/index.php?topic=98402.0

I may have to update that post at some point.  The code I have in that thread is not a complete shortcuts file.  It has to be pasted into an existing file.  This isn't hard to do.  You just paste it in near the bottom of the file *before* the </Accelerators> tag.

To create your own, you need to a couple of things:

1.  Find a key that's not already being used.  There are a good number of them that are reserved, but there are a lot of others available.
2.  Find the appropriate Media Center Core Command that does the action you want.  Optionally figure out any parameters.
3.  Create the appropriate line for the Resource.xml file.

The Resource.xml file won't exist at first.  Create it (and it's directory), then you can alter it.  Every time you make changes to this file (including the first time you add it), you'll need to restart MC so it can read it on startup.

Here's a simple example from the shortcuts in my post:

Code: [Select]
<Entry Key="Alt;1" Command="10023" Param="1" />
This tells MC that I want to map Alt-1 as a keyboard shortcut.  I want it to use Media Center Core Command # 10023, and pass it a parameter of "1".  What does that do?  You can find out in the Core Commands documentation:

https://wiki.jriver.com/index.php/Media_Center_Core_Commands

Search through that and you'll find this line:

Code: [Select]
10023 MCC_SET_CURRENTLY_PLAYING_RATING int nRating (1 through 5; 0 clears, but see here.)
So this sets a star Rating for the currently playing file.  It sets a rating of 1 star.  Pass a parameter of "5" and it rates as 5 stars.

Do some experiments.  Use some of the commands in my post as a test.  Then make your own.  Or alter mine.  Read through the core commands to find what you want to map.  Ask for help here and I'll try to assist you.

Good luck!

Brian.
Logged
Pages: [1]   Go Up