Kodi Community Forum

Full Version: How to get media keys working on Ubuntu 19.10 for Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have a NUC set up with Ubuntu 19.10 desktop and try to control it with Harmony Hub over Bluetooth (was the only option that I found in the messy harmony menu). Navigation works well, (even sound control in on the computer which I obviously don't use), but the play pause ffw keys don't. I have tried the playing around with dconf-editor with no luck, and Kodi MPRIS plugging which just gives error.

Any advice?

I run Kodi disabling Pulse and running through ALSA if that makes any difference.
I moved to Linux on a NUC for my media center experience, since I can setup all media systems on the same computer, (snapclient, chromium, and Kodi) and get a good sound. (Pi4 does not support HD Sound properly, and windows don't support snapclient)
First I would try to follow the kodi log to see if Kodi receives the non working keys: tail -f ~/.kodi/temp/kodi.log (with debugging enabled) and then press some of the non working keys. Kodi should react on them. 

If you see any reaction at the log, then you can try to map those via the keymap editor add-on.
(2020-03-24, 09:15)DaVu Wrote: [ -> ]First I would try to follow the kodi log to see if Kodi receives the non working keys: tail -f ~/.kodi/temp/kodi.log (with debugging enabled) and then press some of the non working keys. Kodi should react on them. 

If you see any reaction at the log, then you can try to map those via the keymap editor add-on.

I tried key mapping in Kodi as a first thing, but Kodi does not pick up the key at all. I will check the logs later today.

I get a pop-up like this when I use the keys: Image
I admit to not knowing the technical details but if you are getting a reaction from Kodi's UI it must be reacting to something.

Have you tried the debug level log as yet?
(2020-03-26, 15:36)littlejeem Wrote: [ -> ]I admit to not knowing the technical details but if you are getting a reaction from Kodi's UI it must be reacting to something.

Have you tried the debug level log as yet?

Kodi gives output in the debug log for the keys that work. Nothing for the keys that don't work. There seems to be some incompatibility with Ubuntu.
Perhaps this may be of some help ?
Fixed!  Rofl

Was a gnome feature blocking the keys. Found it after ages of searching ask.ubuntu and trial en error:
  • Chek the keys with: sudo showkey -k
  • Then you need to change the keys in gnome:
    • Install the visual key editor: dconf-editor
    • Navigate to org/gnome/settings-daemon/plugins/media-keys
    • Remove the default values and replace with ['']
  • Then you need to change it in one more place, you can read more in ask.ubuntu:
    • Find the keys that you need that have default values: gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys | grep thekey
    • Blank the keys with: conf write /org/gnome/settings-daemon/plugins/media-keys/thekey "''"
    • Check which keys have been set: /etc/systemd/system/cockpit.socket.d/listen.conf
  • reboot 
(2020-03-27, 18:44)Tiger75 Wrote: [ -> ]Fixed!  Rofl

Was a gnome feature blocking the keys. Found it after ages of searching ask.ubuntu and trial en error:
  • Chek the keys with: sudo showkey -k
  • Then you need to change the keys in gnome:
    • Install the visual key editor: dconf-editor
    • Navigate to org/gnome/settings-daemon/plugins/media-keys
    • Remove the default values and replace with ['']
  • Then you need to change it in one more place, you can read more in ask.ubuntu:
    • Find the keys that you need that have default values: gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys | grep thekey
    • Blank the keys with: conf write /org/gnome/settings-daemon/plugins/media-keys/thekey "''"
    • Check which keys have been set: /etc/systemd/system/cockpit.socket.d/listen.conf
  • reboot 
 

https://askubuntu.com/questions/990284/m...untu-17-10
https://askubuntu.com/questions/527990/a...-in-ubuntu