More > JRiver Media Center 21 for Linux
Play/Pause with hotkey
mikeza:
Right now I'm using awesome window manager so my hotkeys are mostly implemented via command line calls but it appears the linux version does not support the command-line commands. What is the best way to get play/pause support working with hotkeys on linux?
mwillems:
MCWS is the best way to handle automation for MC on Linux. If you navigate to localhost:52199 on the machine running MC, you can find the MCWS documentation (it's self documenting).
For some examples of bash scripting using MCWS, check out my notification script: https://yabb.jriver.com/interact/index.php?topic=99309.0
EDIT: Link fixed, thanks Brian!
blgentry:
Don't user defined keys work in the Linux version?
https://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts
They work on the Mac version, so I assumed they had a high chance of working well in Linux also.
BTW Mwillems I think your link isn't the one you meant to post.
Brian.
mwillems:
--- Quote from: blgentry on March 22, 2016, 02:47:54 pm ---Don't user defined keys work in the Linux version?
https://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts
They work on the Mac version, so I assumed they had a high chance of working well in Linux also.
BTW Mwillems I think your link isn't the one you meant to post.
Brian.
--- End quote ---
Those rely on MCC commands don't they? I thought those weren't supported on non-windows platforms? Are you saying that the core command automation works on Mac? If so, I can hold out hope it will come to Linux ;D
Additionally, I'm not sure how well even the built in keyboard shortcuts work in Linux when the window isn't focused. I'll have to test, but when I last fiddled with them (a very long time ago) they didn't work well.
blgentry:
--- Quote from: mwillems on March 22, 2016, 02:55:48 pm ---Those rely on MCC commands don't they? I thought those weren't supported on non-windows platforms? Are you saying that the core command automation works on Mac?
--- End quote ---
Well, not exactly as I think you're thinking of doing something like MC.exe /MCC 20001 right? The user defined keys are done inside of a Resource.xml file that specifically maps keys. Here's a portion of the one I use on MC for Mac:
--- Code: ---<!-- DSP Studio -->
<Entry Key="Ctrl;D" Command="10016" Param="0" />
<!-- Play/Pause -->
<Entry Key="Space" Command="10000" Param="0" TranslateFlags="21" />
<!-- Next and Previous track -->
<Entry Key="Ctrl;Right" Command="10003" Param="2" TranslateFlags="21" />
<Entry Key="Ctrl;Left" Command="10004" Param="2" TranslateFlags="21" />
<!-- Show Now Playing -->
<Entry Key="Ctrl;N" Command="10013" Param="1" />
--- End code ---
As you can see, they specifically use MCC command numbers, but it's called via the "entry key" commands and not through an MC.exe command line.
--- Quote ---Additionally, I'm not sure how well even the built in keyboard shortcuts work in Linux when the window isn't focused. I'll have to test, but when I last fiddled with them (a very long time ago) they didn't work well.
--- End quote ---
As I understand it, none of the keys that are mapped into MC (manually or built in) are functional unless the window is focused. If you want truly global key mappings, then I guess your solution of using MCWS and some kind of scripting and integration with the window manager is probably a better solution.
Brian.
Navigation
[0] Message Index
[#] Next page
Go to full version