INTERACT FORUM

Please login or register.

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

Author Topic: Mac Keyboard Shortcut and User Defined?  (Read 3588 times)

mike.s

  • Recent member
  • *
  • Posts: 20
Mac Keyboard Shortcut and User Defined?
« on: May 23, 2015, 04:52:47 pm »

All the wiki content I see on keyboard shortcuts and user-defined shortcuts is specific to Windows.

In particular the keyboard shortcut for assigning ratings conflicts with the shortcuts for taking screenshots (and burned into my brain, still used frequently) and I'd like to change them, but I'm not sure if the xml file is mac compatible nor where to put it on MC mac.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Mac Keyboard Shortcut and User Defined?
« Reply #1 on: May 23, 2015, 05:30:17 pm »

Yeah, like you said, those keys seem to conflict.  I just tested a few combinations and the best I could come up with is using Alt/Option-# for ratings.  So Alt-1 for 1 star, Alt-3 for 3 stars, etc.  Alt-0 to clear the star rating field.

First you'll need the correct file.  You can modify the Default file, but that's not a great idea.  What you really want is the Resource.xml file in the Custom Resources folder.  The full path should be:

/Applications/Media Center 20.app/Contents/Resources/Data/Custom Resources/Resource.xml

You can put the sample key mapping file there and modify it.  Here are the lines I inserted at the end of mine to make it work with the Alt-# keys:

Code: [Select]
    <!-- Ratings Commands, 0 to clear 1 through 5 to rate -->
    <Entry Key="Alt;0" Command="10023" Param="0" />
    <Entry Key="Alt;1" Command="10023" Param="1" />
    <Entry Key="Alt;2" Command="10023" Param="2" />
    <Entry Key="Alt;3" Command="10023" Param="3" />
    <Entry Key="Alt;4" Command="10023" Param="4" />
    <Entry Key="Alt;5" Command="10023" Param="5" />

If you get that working, you're most of the way there.  The only problem is the Resource.xml file will get overwritten every time you upgrade Media Center!  What you really want to do is make a Resources.xml file outside of the Application and link to it.  I put mine here:

~/Library/Application\ Support/J\ River/Media\ Center\ 20/Data/Custom\ Resources/Resource.xml

To link to it, first go into the Application via Finder and locate the Custom Resources directory (inside the application).  Delete the folder (assuming it's empty).  Then you can create a link of that folder to the folder above where the "real" file is.  Go to terminal and carefully paste in:

Code: [Select]
ln -s ~/Library/Application\ Support/J\ River/Media\ Center\ 20/Data/Custom\ Resources/ /Applications/Media\ Center\ 20.app/Contents/Resources/Data/Custom\ Resources
The Custom Resources folder should re-appear inside the Application in Finder as a shortcut.  When you fire up Media Center, it should read it.  Note that Media Center needs to be restarted to re-read the Resource.xml file.

I've left out some details here, but hopefully this will get you started in the right direction.

Good luck and let us know how it works out for you.

Brian.
Logged

avpman

  • Galactic Citizen
  • ****
  • Posts: 445
  • Dad to three beatuiful Boxers by rescue.
Re: Mac Keyboard Shortcut and User Defined?
« Reply #2 on: June 03, 2015, 05:14:52 pm »

Yeah, like you said, those keys seem to conflict.  I just tested a few combinations and the best I could come up with is using Alt/Option-# for ratings.  So Alt-1 for 1 star, Alt-3 for 3 stars, etc.  Alt-0 to clear the star rating field.

First you'll need the correct file.  You can modify the Default file, but that's not a great idea.  What you really want is the Resource.xml file in the Custom Resources folder.  The full path should be:

/Applications/Media Center 20.app/Contents/Resources/Data/Custom Resources/Resource.xml

You can put the sample key mapping file there and modify it.  Here are the lines I inserted at the end of mine to make it work with the Alt-# keys:

Code: [Select]
   <!-- Ratings Commands, 0 to clear 1 through 5 to rate -->
    <Entry Key="Alt;0" Command="10023" Param="0" />
    <Entry Key="Alt;1" Command="10023" Param="1" />
    <Entry Key="Alt;2" Command="10023" Param="2" />
    <Entry Key="Alt;3" Command="10023" Param="3" />
    <Entry Key="Alt;4" Command="10023" Param="4" />
    <Entry Key="Alt;5" Command="10023" Param="5" />

If you get that working, you're most of the way there.  The only problem is the Resource.xml file will get overwritten every time you upgrade Media Center!  What you really want to do is make a Resources.xml file outside of the Application and link to it.  I put mine here:

~/Library/Application\ Support/J\ River/Media\ Center\ 20/Data/Custom\ Resources/Resource.xml

To link to it, first go into the Application via Finder and locate the Custom Resources directory (inside the application).  Delete the folder (assuming it's empty).  Then you can create a link of that folder to the folder above where the "real" file is.  Go to terminal and carefully paste in:

Code: [Select]
ln -s ~/Library/Application\ Support/J\ River/Media\ Center\ 20/Data/Custom\ Resources/ /Applications/Media\ Center\ 20.app/Contents/Resources/Data/Custom\ Resources
The Custom Resources folder should re-appear inside the Application in Finder as a shortcut.  When you fire up Media Center, it should read it.  Note that Media Center needs to be restarted to re-read the Resource.xml file.

I've left out some details here, but hopefully this will get you started in the right direction.

Good luck and let us know how it works out for you.

Brian.


Brian,
Thanks for your hard work on this. Looks like they just fixed the overwrite issue in 20.116!
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Mac Keyboard Shortcut and User Defined?
« Reply #3 on: June 03, 2015, 06:00:03 pm »

^ Yep, they've now moved the Custom Resources directory to:

~/Library/Application Support/J River/Media Center 20/Data/Custom Resources

Note the ~ .  That means your home directory.

Brian.
Logged

avpman

  • Galactic Citizen
  • ****
  • Posts: 445
  • Dad to three beatuiful Boxers by rescue.
Re: Mac Keyboard Shortcut and User Defined?
« Reply #4 on: June 03, 2015, 07:43:03 pm »

^ Yep, they've now moved the Custom Resources directory to:

~/Library/Application Support/J River/Media Center 20/Data/Custom Resources

Note the ~ .  That means your home directory.

Brian.

Got it - thanks! Had to create the "Custom Resources" directory. Do the entry key elements in the custom "Resource.xml" file need to be surrounded by opening and closing parent tags? The default Resource.xml file has <ACCELERATORS> and <MJRS> opening and closing tags.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Mac Keyboard Shortcut and User Defined?
« Reply #5 on: June 03, 2015, 07:53:02 pm »

Follow this link to a wiki entry.  It tells about keyboard customization and most importantly includes a sample file for you to modify!

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

Good luck,

Brian.
Logged

avpman

  • Galactic Citizen
  • ****
  • Posts: 445
  • Dad to three beatuiful Boxers by rescue.
Re: Mac Keyboard Shortcut and User Defined?
« Reply #6 on: June 03, 2015, 08:25:42 pm »

Follow this link to a wiki entry.  It tells about keyboard customization and most importantly includes a sample file for you to modify!

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

Good luck,

Brian.

Brian,
As always, you're helpful and accurate.
Many thanks...
Logged
Pages: [1]   Go Up