INTERACT FORUM

Please login or register.

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

Author Topic: Media keys... how to make them working  (Read 1854 times)

jmz

  • Recent member
  • *
  • Posts: 43
Media keys... how to make them working
« on: December 21, 2023, 05:11:11 pm »

I'm trying to switch from Windows version to Linux.

I managed to solve all problems except this one.

I use Rii i25 remote. It works like air mouse and keyboard. It also have media keys.

But JRiver media is not using media keys. It use combination of normal keys.

For example I can use dedicated Mute key from this remote to mute Linux sound. But can't use it to mute JRiver media internal volume mute because this is using combination of Ctrl+M.

I can't also use Volume Up or Down... or even that simple keys like Pause/Play or Next/Previous. Because JRiver is ignoring dedicated media keys and is using only regular keyboard keys combination.

Under Windows I solved this problem in simple way by using Windows PowerToys. I remapped combination of keys for example Ctrl+M to Rii i25 remote dedicated Mute key.
The same with others like Volume Up and Down, Play/Pause or Next/Previous track.

But i can't manage to remap those keys under Linux.

Is there any other option to force JRiver media to use regular multimedia keys under Linux?

Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Media keys... how to make them working
« Reply #1 on: December 21, 2023, 05:23:06 pm »

I'm trying to switch from Windows version to Linux.

I managed to solve all problems except this one.

I use Rii i25 remote. It works like air mouse and keyboard. It also have media keys.

But JRiver media is not using media keys. It use combination of normal keys.

For example I can use dedicated Mute key from this remote to mute Linux sound. But can't use it to mute JRiver media internal volume mute because this is using combination of Ctrl+M.

I can't also use Volume Up or Down... or even that simple keys like Pause/Play or Next/Previous. Because JRiver is ignoring dedicated media keys and is using only regular keyboard keys combination.

Under Windows I solved this problem in simple way by using Windows PowerToys. I remapped combination of keys for example Ctrl+M to Rii i25 remote dedicated Mute key.
The same with others like Volume Up and Down, Play/Pause or Next/Previous track.

But i can't manage to remap those keys under Linux.

Is there any other option to force JRiver media to use regular multimedia keys under Linux?

Have a look at this thread for some troubleshooting suggestions and potential workarounds:  https://yabb.jriver.com/interact/index.php/topic,136975.msg950483.html
Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #2 on: December 21, 2023, 05:28:48 pm »

Have a look at this thread for some troubleshooting suggestions and potential workarounds:  https://yabb.jriver.com/interact/index.php/topic,136975.msg950483.html

Thanks for answer.

I only see two options:

Force JRiver media to use multimedia keys instead of regular keys combination.

or

Find some easy tool to remap keys on Debian.

PS.
I'm sure that this are the only options because I solved this problem on Windows.

PS.2
Why JRiver Media is not using dedicated multimedia keys?

Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Media keys... how to make them working
« Reply #3 on: December 21, 2023, 06:26:07 pm »

The thread I linked discusses some tools to let you remap the keys on Debian.  The issue is that desktop environments like Gnome consume the media keys and don't pass them on to JRiver, and JRiver isn't hooked into the MPRIS/dbus system to get them once they're consumed.  So your choices are to try a simpler desktop environment (like XFCE) or remap some keys as described in that thread.
Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #4 on: December 22, 2023, 07:47:27 am »

The thread I linked discusses some tools to let you remap the keys on Debian.  The issue is that desktop environments like Gnome consume the media keys and don't pass them on to JRiver, and JRiver isn't hooked into the MPRIS/dbus system to get them once they're consumed.  So your choices are to try a simpler desktop environment (like XFCE) or remap some keys as described in that thread.

Thanks again... I didn't know that under Linux the problem is so complicated. My previous opinion was based on Windows where using simple graphic tool (PowerToys) I was able to successfully remap regular keyboard keys combinations to Rii i25 multimedia keys.

I'm in situation when using identical hardware (Intel NUC 8I5BEH plus Rii i25 remote) I easily managed to make it fully working with all multimedia keys working on Windows 10.
But have huge problems trying to achieve the same effect on Ubuntu or Debian.

I was thinking that with Linux (tried Debian and Ubuntu) it will go the same way. I tried some Linux remapping apps but it didn't work like I expected comparing to Windows.

I will try one more time using XFCE as desktop environment. I think that it was already mentioned that this could be the best solution for JRiver Media on Linux. Now I'm starting to understand why.

Maybe someone could do tutorial about JRiver Media on Linux system. With all informations which Linux version and desktop environment will be the best. Also with explaining what customs settings will help us to get maximum functionality and quality from JRiver Media.

I think that more and more JRiver users will look for change from Windows to Linux. So... that kind tutorial would make sense.

Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Media keys... how to make them working
« Reply #5 on: December 22, 2023, 08:07:43 am »

I think you are overthinking this. GNOME has a keyboard shortcut editor built-in:



So just add your custom MC commands pointing at the MC stub or make an MCWS call in that settings>keyboard>custom shortcuts window. It really is quite easy.
Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #6 on: December 22, 2023, 08:56:31 am »

I think you are overthinking this. GNOME has a keyboard shortcut editor built-in:



So just add your custom MC commands pointing at the MC stub or make an MCWS call in that settings>keyboard>custom shortcuts window. It really is quite easy.

Could you please explain this... I tried to use it in the first place and it didn't work. I was expecting that it will work like PowerToys on Windows but it didn't.

Please give me example how to map Mute, Volume Up, Volume Down, Play/Pause, Next, Previous for JRiver Media.

I tried to use it by creating new shortcut for each function from the list from above.

For example

Shortut name: JRiver Mute

Command: Ctrl+M

Assigned key: Rii i25 remote device (Audio Mute key)

I did the same in Windows PowerToys and it is working for very long time without any problems.


I don't understand what did you mean:

"custom MC commands pointing at the MC stub or make an MCWS"

Did you mean this:

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

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Media keys... how to make them working
« Reply #7 on: December 22, 2023, 09:16:27 am »

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

To use the stub, call /usr/lib/jriver/MC31/mc31. You can also add the stub to your PATH if you don't want to use the full path.

So for play/pause, add a custom command "/usr/lib/jriver/MC31/mc31 /MCC 10000" and assign your chosen shortcut keys.



I prefer using the MCWS because then I don't need to update my shortcuts whenever there is a major MC version upgrade: https://wiki.jriver.com/index.php/Web_Service_Interface

"curl -s -o /dev/null -u username:password http://localhost:52199/MCWS/v1/Control/MCC?Command=10000"
Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #8 on: December 22, 2023, 09:19:00 am »

Thank you... Thank you... Thank you...

It is so simple now!

I will try to do it later. Will let you know the results.
Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #9 on: December 22, 2023, 11:13:36 am »

I think you are overthinking this. GNOME has a keyboard shortcut editor built-in:

...

I did everything like you explained. Unfortunately it is not working on Debian 12.4 with Gnome.

I used the table with command codes and created custom shortcuts for: Play/Pause, Next, Previous, Mute, Volume Up, Volume Down.

I tested each of them in terminal and they are working. So the path is correct and the command is also correct.

I choose multimedia keys on my remote controller Rii i25 to execute the commands.

Unfortunately looks like operating system is intercepting the key strike and each time I use the multimedia keys from my remote I see OSD graphic.

Only Next is working properly. JRiver media is reacting and jumping to next song when I use Next button on my Rii i25 remote.

What next?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Media keys... how to make them working
« Reply #10 on: December 22, 2023, 11:30:19 am »

Did you try rebooting?
Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #11 on: December 22, 2023, 11:34:03 am »

Did you try rebooting?

Of course... yes.

Please remember that one key combination was working. The "Next" custom shortcut was working. No OSD icon when I pressed that button and JRiver Media center was reacting in correct way jumping to next song from the list.

Before I give up I tried the last idea... I configured media keys in Debian setting to some weird keyboards shortcuts (For example I set Play/Pause to Ctrl+Alt+K) hoping that it will cause that Debian will stop intercepting my Play/Pause button on my remote controller. But this also didn't work.

So... I give up Debian 12.4 Gnome

Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #12 on: December 22, 2023, 12:39:17 pm »

...  So your choices are to try a simpler desktop environment (like XFCE)


To use the stub, call /usr/lib/jriver/MC31/mc31. You can also add the stub to your PATH if you don't want to use the full path.
So for play/pause, add a custom command "/usr/lib/jriver/MC31/mc31 /MCC 10000" and assign your chosen shortcut keys.


Did you try rebooting?


Thank you all for help... I managed to make huge progress but will need bit more help.

I installed Debian 12.4 Xfce.

I created custom shortcuts for Play/Pause, Next, Previous, Mute, Volume Up, Volume Down.

Thanks to Xfce operating system is not trying to intercept when I use multimedia keys on my remote.

Play/Pause is working

Next is working

Previous is working

Mute is working

Volume Up is not working (I see JRiver reaction but it is showing only for a moment Volume 100% but nothing is changing)

Volume Down is not working (I see JRiver reaction but it is showing only for a moment Volume 100% but nothing is changing)

I tried this 2 not working commands in terminal.

10018 and 10019 from terminal are causing the same effect like using multimedia keys (Vol up and down) on my remote.

So I think something is wrong with JRiver settings this time. I set it with internal volume control. But maybe I missed something else...

So... I'm very close to solve all problems... but still need more help...
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Media keys... how to make them working
« Reply #13 on: December 22, 2023, 04:16:44 pm »

You'll probably want to use system volume control and just let the system handle those keys or map them to MC if that does not work.
Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #14 on: December 22, 2023, 04:28:02 pm »

You'll probably want to use system volume control and just let the system handle those keys or map them to MC if that does not work.

Prefer to stay with Internal Volume control. This is still experimental. Main JRiver instalation is still on Windows.

When using commands in terminal for Volume Up and Down... on Debian 12.4 Gnome it was working. But on Debian 12.4 Xfce is not working.

Also Xfce is a huge pain to configure. Maybe better option would be to return to Gnome and try again with keys remap.

Logged

jmz

  • Recent member
  • *
  • Posts: 43
Re: Media keys... how to make them working
« Reply #15 on: December 23, 2023, 11:31:41 am »

I think that I found simple solution.

To disable multimedia keys (stop Linux from using or intercept them) you have to install dconf-editor.

Then go there:

org/gnome/settings-daemon/plugins/media-keys

then disable all XF86Audio* keys

Then go to keyboard settings and create custom shortcuts using JRiver commands and selecting our multimedia keys.

PS.
The only problem is with Volume Up and Down. I verified the source of the problem by using commands in terminal.

10018 and 10019 from terminal are not working... The volume value is not changing. Using this command is only displaying current Volume value in JRiver Media.

PS.
I also solved this problem. Commands 10018 and 10019 need parameter how much change the volume. When I changed command to 10018,10 and 10019,10 then changing volume started working and each step is 10%.

Logged
Pages: [1]   Go Up