summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-10-21 13:56:16 +0200
committerHans de Goede <hdegoede@redhat.com>2018-10-21 13:56:16 +0200
commit2d344c5c1e65406e895115a71a59cbee0b0c0bab (patch)
tree7f6252d62be457ce6a57e8ce80aaa71f62d891f4
parenta5514ae097e5881df3ef26c63f4f4652b3f77811 (diff)
downloadgnome-settings-daemon-2d344c5c1e65406e895115a71a59cbee0b0c0bab.tar.gz
media-keys: Add mapping for Ctrl + media-key for some media-keys
Some bluetooth keyboards have only 5 rows of keys, so the top row has the: 1-9, 0, -, + keys. These not only double as function keys using Fn + key, but also as media-keys, e.g. next/prev song, using Ctrl + Fn + key. Unfortunately the firmware for these keyboards is somewhat buggy and when sending media keys they send along the Ctrl modifier, so we receive e.g. "Ctrl + next-song" this commit adds bindings for Ctrl + media-key for the media-keycodes send by these keyboards, so that these work as expected.
-rw-r--r--plugins/media-keys/shortcuts-list.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h
index 29f5194e..744352ab 100644
--- a/plugins/media-keys/shortcuts-list.h
+++ b/plugins/media-keys/shortcuts-list.h
@@ -48,7 +48,9 @@ static struct {
{ TOUCHPAD_OFF_KEY, NULL, N_("Touchpad Off"), "XF86TouchpadOff", SHELL_ACTION_MODE_ALL },
{ MUTE_KEY, "volume-mute", NULL, NULL, SHELL_ACTION_MODE_ALL },
{ VOLUME_DOWN_KEY, "volume-down", NULL, NULL, SHELL_ACTION_MODE_ALL },
+ { VOLUME_DOWN_KEY, NULL, NULL, "<Ctrl>XF86AudioLowerVolume", SHELL_ACTION_MODE_ALL },
{ VOLUME_UP_KEY, "volume-up", NULL, NULL, SHELL_ACTION_MODE_ALL },
+ { VOLUME_UP_KEY, NULL, NULL, "<Ctrl>XF86AudioRaiseVolume", SHELL_ACTION_MODE_ALL },
{ MIC_MUTE_KEY, "mic-mute", NULL, NULL, SHELL_ACTION_MODE_ALL },
{ MUTE_QUIET_KEY, NULL, N_("Quiet Volume Mute"), "<Alt>XF86AudioMute", SHELL_ACTION_MODE_ALL },
{ VOLUME_DOWN_QUIET_KEY, NULL, N_("Quiet Volume Down"), "<Alt>XF86AudioLowerVolume", SHELL_ACTION_MODE_ALL },
@@ -76,10 +78,13 @@ static struct {
{ SCREENCAST_KEY, "screencast", NULL, NULL, NO_LOCK_MODE },
{ WWW_KEY, "www", NULL, NULL, GSD_ACTION_MODE_LAUNCHER },
{ PLAY_KEY, "play", NULL, NULL, SHELL_ACTION_MODE_ALL },
+ { PLAY_KEY, NULL, NULL, "<Ctrl>XF86AudioPlay", SHELL_ACTION_MODE_ALL },
{ PAUSE_KEY, "pause", NULL, NULL, SHELL_ACTION_MODE_ALL },
{ STOP_KEY, "stop", NULL, NULL, SHELL_ACTION_MODE_ALL },
{ PREVIOUS_KEY, "previous", NULL, NULL, SHELL_ACTION_MODE_ALL },
+ { PREVIOUS_KEY, NULL, NULL, "<Ctrl>XF86AudioPrev", SHELL_ACTION_MODE_ALL },
{ NEXT_KEY, "next", NULL, NULL, SHELL_ACTION_MODE_ALL },
+ { NEXT_KEY, NULL, NULL, "<Ctrl>XF86AudioNext", SHELL_ACTION_MODE_ALL },
{ REWIND_KEY, NULL, N_("Rewind"), "XF86AudioRewind", SHELL_ACTION_MODE_ALL },
{ FORWARD_KEY, NULL, N_("Forward"), "XF86AudioForward", SHELL_ACTION_MODE_ALL },
{ REPEAT_KEY, NULL, N_("Repeat"), "XF86AudioRepeat", SHELL_ACTION_MODE_ALL },