[gnome-settings-daemon] media-keys: Add mapping for Ctrl + media-key for some media-keys
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: Add mapping for Ctrl + media-key for some media-keys
- Date: Tue, 6 Nov 2018 11:26:40 +0000 (UTC)
commit 2d344c5c1e65406e895115a71a59cbee0b0c0bab
Author: Hans de Goede <hdegoede redhat com>
Date: Sun Oct 21 13:56:16 2018 +0200
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.
plugins/media-keys/shortcuts-list.h | 5 +++++
1 file changed, 5 insertions(+)
---
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 },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]