0

For some reason in the last few days, my keyboard shortcuts to adjust volume broke. I haven't done anything crazy - the only related thing I can think of is I added myself to the audio group so I could get audio over HDMI working (which, btw, was also weird).

Anyways, I didn't think it was a big deal - just go into Keyboard settings and fix the shortcut. Except whenever I try to set my shortcuts, it just acts like I hit Escape or something and they stay disabled.

I ran xev to double check what the system sees those keys as, and also recorded a video using Screencast which confirmed that the keys are being seen as XF86AudioRaiseVolume, XF86AudioLowerVolume, and XF86AudioMute.

For the record, I'm running eOS on a Toshiba Chromebook 2 (2015), with the i3 processor, so I have a chromebook keyboard layout. I ran fascinatingcaptain's script from his github to remap the media keys and everything's been working fine.

Anybody know what's going on?

Video trying to edit keyboard shortcuts


Steps I've Taken So Far

Thanks @Sebastian for all the help so far. I followed your instructions for editing the key settings and then locking them down, and that seemed to make the settings stick. The media keys functioned normally. After a system restart it broke again. I can confirm that the keys are set properly, since gsettings get org.gnome... outputs what I would expect, i.e. XF86AudioRaiseVolume, etc. Also, trying to edit them spits back an error, which seems to confirm that locking them worked.

Here's the output from listing my current media key and keybindings:

gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys | sort | more yields:

org.gnome.settings-daemon.plugins.media-keys active true
org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip '<Ctrl><Shift>Print'
org.gnome.settings-daemon.plugins.media-keys area-screenshot '<Shift>Print'
org.gnome.settings-daemon.plugins.media-keys calculator 'XF86Calculator'
org.gnome.settings-daemon.plugins.media-keys control-center 'XF86Tools'
org.gnome.settings-daemon.plugins.media-keys custom-keybindings ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/']
org.gnome.settings-daemon.plugins.media-keys decrease-text-size ''
org.gnome.settings-daemon.plugins.media-keys eject 'XF86Eject'
org.gnome.settings-daemon.plugins.media-keys email 'XF86Mail'
org.gnome.settings-daemon.plugins.media-keys help ''
org.gnome.settings-daemon.plugins.media-keys home 'XF86Explorer'
org.gnome.settings-daemon.plugins.media-keys increase-text-size ''
org.gnome.settings-daemon.plugins.media-keys logout '<Control><Alt>Delete'
org.gnome.settings-daemon.plugins.media-keys magnifier '<Alt><Super>8'
org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-in '<Alt><Super>equal'
org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-out '<Alt><Super>minus'
org.gnome.settings-daemon.plugins.media-keys max-screencast-length uint32 30
org.gnome.settings-daemon.plugins.media-keys media 'XF86AudioMedia'
org.gnome.settings-daemon.plugins.media-keys next 'XF86AudioNext'
org.gnome.settings-daemon.plugins.media-keys on-screen-keyboard ''
org.gnome.settings-daemon.plugins.media-keys pause 'XF86AudioPause'
org.gnome.settings-daemon.plugins.media-keys play 'XF86AudioPlay'
org.gnome.settings-daemon.plugins.media-keys previous 'XF86AudioPrev'
org.gnome.settings-daemon.plugins.media-keys priority 0
org.gnome.settings-daemon.plugins.media-keys screencast '<Ctrl><Shift><Alt>R'
org.gnome.settings-daemon.plugins.media-keys screenreader '<Alt><Super>s'
org.gnome.settings-daemon.plugins.media-keys screensaver '<Super>l'
org.gnome.settings-daemon.plugins.media-keys screenshot-clip '<Ctrl>Print'
org.gnome.settings-daemon.plugins.media-keys screenshot 'Print'
org.gnome.settings-daemon.plugins.media-keys search 'XF86Search'
org.gnome.settings-daemon.plugins.media-keys stop 'XF86AudioStop'
org.gnome.settings-daemon.plugins.media-keys terminal '<Super>t'
org.gnome.settings-daemon.plugins.media-keys toggle-contrast ''
org.gnome.settings-daemon.plugins.media-keys video-out '<Super>p'
org.gnome.settings-daemon.plugins.media-keys volume-down 'XF86AudioLowerVolume'
org.gnome.settings-daemon.plugins.media-keys volume-mute 'XF86AudioMute'
org.gnome.settings-daemon.plugins.media-keys volume-up 'XF86AudioRaiseVolume'
org.gnome.settings-daemon.plugins.media-keys window-screenshot '<Alt>Print'
org.gnome.settings-daemon.plugins.media-keys window-screenshot-clip '<Ctrl><Alt>Print'
org.gnome.settings-daemon.plugins.media-keys www 'XF86WWW'

gsettings list-recursively org.gnome.desktop.wm.keybindings | sort | more yields:

org.gnome.desktop.wm.keybindings activate-window-menu ['<Alt>space']
org.gnome.desktop.wm.keybindings always-on-top @as []
org.gnome.desktop.wm.keybindings begin-move ['<Alt>F7']
org.gnome.desktop.wm.keybindings begin-resize ['<Alt>F8']
org.gnome.desktop.wm.keybindings close ['<Alt>F4']
org.gnome.desktop.wm.keybindings cycle-group ['<Alt>F6']
org.gnome.desktop.wm.keybindings cycle-group-backward ['<Shift><Alt>F6']
org.gnome.desktop.wm.keybindings cycle-panels-backward ['<Shift><Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-panels ['<Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-windows ['<Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-windows-backward ['<Shift><Alt>Escape']
org.gnome.desktop.wm.keybindings lower @as []
org.gnome.desktop.wm.keybindings maximize @as []
org.gnome.desktop.wm.keybindings maximize-horizontally @as []
org.gnome.desktop.wm.keybindings maximize-vertically @as []
org.gnome.desktop.wm.keybindings minimize ['<Super>h']
org.gnome.desktop.wm.keybindings move-to-center @as []
org.gnome.desktop.wm.keybindings move-to-corner-ne @as []
org.gnome.desktop.wm.keybindings move-to-corner-nw @as []
org.gnome.desktop.wm.keybindings move-to-corner-se @as []
org.gnome.desktop.wm.keybindings move-to-corner-sw @as []
org.gnome.desktop.wm.keybindings move-to-monitor-down ['<Super><Shift>Down']
org.gnome.desktop.wm.keybindings move-to-monitor-left ['<Super><Shift>Left']
org.gnome.desktop.wm.keybindings move-to-monitor-right ['<Super><Shift>Right']
org.gnome.desktop.wm.keybindings move-to-monitor-up ['<Super><Shift>Up']
org.gnome.desktop.wm.keybindings move-to-side-e @as []
org.gnome.desktop.wm.keybindings move-to-side-n @as []
org.gnome.desktop.wm.keybindings move-to-side-s @as []
org.gnome.desktop.wm.keybindings move-to-side-w @as []
org.gnome.desktop.wm.keybindings move-to-workspace-10 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-11 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-12 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-1 ['<Super><Shift>1', '<Super><Alt>1']
org.gnome.desktop.wm.keybindings move-to-workspace-2 ['<Super><Shift>2', '<Super><Alt>2']
org.gnome.desktop.wm.keybindings move-to-workspace-3 ['<Super><Shift>3', '<Super><Alt>3']
org.gnome.desktop.wm.keybindings move-to-workspace-4 ['<Super><Shift>4', '<Super><Alt>4']
org.gnome.desktop.wm.keybindings move-to-workspace-5 ['<Super><Shift>5', '<Super><Alt>5']
org.gnome.desktop.wm.keybindings move-to-workspace-6 ['<Super><Shift>6', '<Super><Alt>6']
org.gnome.desktop.wm.keybindings move-to-workspace-7 ['<Super><Shift>7', '<Super><Alt>7']
org.gnome.desktop.wm.keybindings move-to-workspace-8 ['<Super><Shift>8', '<Super><Alt>8']
org.gnome.desktop.wm.keybindings move-to-workspace-9 ['<Super><Shift>9', '<Super><Alt>9']
org.gnome.desktop.wm.keybindings move-to-workspace-down ['<Super><Shift>Page_Down', '<Control><Shift><Alt>Down']
org.gnome.desktop.wm.keybindings move-to-workspace-last ['<Super><Shift>End']
org.gnome.desktop.wm.keybindings move-to-workspace-left ['<Super><Alt>Left']
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Super><Alt>Right']
org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Super><Shift>Page_Up', '<Control><Shift><Alt>Up']
org.gnome.desktop.wm.keybindings panel-main-menu ['<Super>space', '<Alt>F2']
org.gnome.desktop.wm.keybindings panel-run-dialog @as []
org.gnome.desktop.wm.keybindings raise @as []
org.gnome.desktop.wm.keybindings raise-or-lower @as []
org.gnome.desktop.wm.keybindings set-spew-mark @as []
org.gnome.desktop.wm.keybindings show-desktop ['<Super>Down', '<Super>s']
org.gnome.desktop.wm.keybindings switch-applications @as []
org.gnome.desktop.wm.keybindings switch-applications-backward @as []
org.gnome.desktop.wm.keybindings switch-group-backward ['<Shift><Super>Above_Tab', '<Shift><Alt>Above_Tab']
org.gnome.desktop.wm.keybindings switch-group ['<Super>Above_Tab', '<Alt>Above_Tab']
org.gnome.desktop.wm.keybindings switch-input-source @as []
org.gnome.desktop.wm.keybindings switch-input-source-backward @as []
org.gnome.desktop.wm.keybindings switch-panels-backward ['<Shift><Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-panels ['<Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-to-workspace-10 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-11 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-12 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-1 ['<Super>1']
org.gnome.desktop.wm.keybindings switch-to-workspace-2 ['<Super>2']
org.gnome.desktop.wm.keybindings switch-to-workspace-3 ['<Super>3']
org.gnome.desktop.wm.keybindings switch-to-workspace-4 ['<Super>4']
org.gnome.desktop.wm.keybindings switch-to-workspace-5 ['<Super>5']
org.gnome.desktop.wm.keybindings switch-to-workspace-6 ['<Super>6']
org.gnome.desktop.wm.keybindings switch-to-workspace-7 ['<Super>7']
org.gnome.desktop.wm.keybindings switch-to-workspace-8 ['<Super>8']
org.gnome.desktop.wm.keybindings switch-to-workspace-9 ['<Super>9']
org.gnome.desktop.wm.keybindings switch-to-workspace-down @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-last ['<Super>End']
org.gnome.desktop.wm.keybindings switch-to-workspace-left ['<Super>Left']
org.gnome.desktop.wm.keybindings switch-to-workspace-right ['<Super>Right']
org.gnome.desktop.wm.keybindings switch-to-workspace-up @as []
org.gnome.desktop.wm.keybindings switch-windows ['<Alt>Tab']
org.gnome.desktop.wm.keybindings switch-windows-backward ['<Alt><Shift>Tab']
org.gnome.desktop.wm.keybindings toggle-above @as []
org.gnome.desktop.wm.keybindings toggle-fullscreen @as []
org.gnome.desktop.wm.keybindings toggle-maximized ['<Super>Up']
org.gnome.desktop.wm.keybindings toggle-on-all-workspaces @as []
org.gnome.desktop.wm.keybindings toggle-shaded @as []
org.gnome.desktop.wm.keybindings unmaximize ['<Alt>F5']

Final Solution (Sort Of)

I followed the suggestions from @Sebastian to edit the key settings and then lock them, but did so in a root shell, which seems to let the settings persist through reboots.

Follow up - shortcuts don't persist through reboots anymore. But the shortcuts can be made to stick, at least temporarily, but editing the settings in a root shell, locking them, and then updating dconf via dconf update. I'll probably just make a script to do this on startup for now until it gets fixed upstream.

  • to improve the info: which version of elementary you use? – Sebastian Nov 26 '18 at 20:06
  • I'm running Juno. – Kyle Norquist Nov 29 '18 at 0:34
0

Possible solution

Install dconf-editor

sudo apt install dconf-editor

Run dconf-editor

go to:

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

Look after volume-* related entries

dconf-editor-volume-entries

Enter the proper values there and check again, maybe a relog or reboot could be useful to start clean after the change


If you want to use commands instead of gconf-editor:

gsettings set org.gnome.settings-daemon.plugins.media-keys volume-down XF86AudioLowerVolume

gsettings set org.gnome.settings-daemon.plugins.media-keys volume-up XF86AudioRaiseVolume

gsettings set org.gnome.settings-daemon.plugins.media-keys volume-mute XF86AudioMute


To confirm/check each key

gsettings get org.gnome.settings-daemon.plugins.media-keys volume-down

gsettings get org.gnome.settings-daemon.plugins.media-keys volume-up

gsettings get org.gnome.settings-daemon.plugins.media-keys volume-mute


List Current Media & Gnome Keymap

gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys | sort | more

gsettings list-recursively org.gnome.desktop.wm.keybindings | sort | more


Lock down specific settings

https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en

https://help.gnome.org/admin/system-admin-guide/stable/desktop-background.html.en

  • That worked perfectly, thank you! No idea why they got messed up, but good to know about dconf-editor. Editing the keyboard shortcuts via Settings is still broken though, but for now I'll use dconf-editor. – Kyle Norquist Nov 26 '18 at 20:20
  • I recommend you to go and report the issue on github, that way it could get fixed. github.com/elementary/switchboard-plug-keyboard – Sebastian Nov 26 '18 at 20:21
  • I don't know what has happened upstream, but the audio keys broke again, and no amount of finaggling in dconf-editor will fix it. Super frustrating. I found a similar issue filed on github so I added on with my two cents: github.com/elementary/switchboard-plug-keyboard/issues/194 – Kyle Norquist Nov 29 '18 at 0:36
  • list (editing your question) your keymap, maybe there's the answer. I just added some commands for it – Sebastian Nov 29 '18 at 2:19
  • also check the lock settings (two links at the bottom), maybe if you set them as system-wide as root and them lock them nothing will change them – Sebastian Nov 29 '18 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.