[gnome-settings-daemon/wip/benzea/multiple-keybindings: 10/11] media-keys: Move all keyboard bindings into settings
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/benzea/multiple-keybindings: 10/11] media-keys: Move all keyboard bindings into settings
- Date: Mon, 13 May 2019 20:57:07 +0000 (UTC)
commit ad4007cf5c2f76555e4da490513ede277f2973a9
Author: Benjamin Berg <bberg redhat com>
Date: Mon May 13 22:09:58 2019 +0200
media-keys: Move all keyboard bindings into settings
This creates new "X-static" binding entries in the configuration store
which store all the previously hard-coded keys. The effect is that it is
possible for users to override the behaviour, with the caveat that newly
added keybindings will not be picked up for that key.
...ttings-daemon.plugins.media-keys.gschema.xml.in | 422 +++++++++++++++++++--
plugins/media-keys/gsd-media-keys-manager.c | 33 +-
plugins/media-keys/shortcuts-list.h | 133 +++----
3 files changed, 485 insertions(+), 103 deletions(-)
---
diff --git a/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
b/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
index 619cdd40..36c29ee4 100644
--- a/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
+++ b/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
@@ -185,52 +185,52 @@
<description>List of custom keybindings</description>
</key>
<key name="calculator" type="as">
- <default>['', 'XF86Calculator']</default>
+ <default>['']</default>
<summary>Launch calculator</summary>
<description>Binding to launch the calculator.</description>
</key>
<key name="control-center" type="as">
- <default>['', 'XF86Tools']</default>
+ <default>['']</default>
<summary>Launch settings</summary>
<description>Binding to launch GNOME settings.</description>
</key>
<key name="email" type="as">
- <default>['', 'XF86Mail']</default>
+ <default>['']</default>
<summary>Launch email client</summary>
<description>Binding to launch the email client.</description>
</key>
<key name="eject" type="as">
- <default>['', 'XF86Eject']</default>
+ <default>['']</default>
<summary>Eject</summary>
<description>Binding to eject an optical disc.</description>
</key>
<key name="help" type="as">
- <default>['']</default>
+ <default>['', '<Super>F1']</default>
<summary>Launch help browser</summary>
<description>Binding to launch the help browser.</description>
</key>
<key name="home" type="as">
- <default>['', 'XF86Explorer']</default>
+ <default>['']</default>
<summary>Home folder</summary>
<description>Binding to open the Home folder.</description>
</key>
<key name="media" type="as">
- <default>['', 'XF86AudioMedia']</default>
+ <default>['']</default>
<summary>Launch media player</summary>
<description>Binding to launch the media player.</description>
</key>
<key name="next" type="as">
- <default>['', 'XF86AudioNext']</default>
+ <default>['']</default>
<summary>Next track</summary>
<description>Binding to skip to next track.</description>
</key>
<key name="pause" type="as">
- <default>['', 'XF86AudioPause']</default>
+ <default>['']</default>
<summary>Pause playback</summary>
<description>Binding to pause playback.</description>
</key>
<key name="play" type="as">
- <default>['', 'XF86AudioPlay']</default>
+ <default>['']</default>
<summary>Play (or play/pause)</summary>
<description>Binding to start playback (or toggle play/pause).</description>
</key>
@@ -240,7 +240,7 @@
<description>Binding to log out.</description>
</key>
<key name="previous" type="as">
- <default>['', 'XF86AudioPrev']</default>
+ <default>['']</default>
<summary>Previous track</summary>
<description>Binding to skip to previous track.</description>
</key>
@@ -250,32 +250,64 @@
<description>Binding to lock the screen.</description>
</key>
<key name="search" type="as">
- <default>['XF86Search']</default>
+ <default>['']</default>
<summary>Search</summary>
<description>Binding to launch the search tool.</description>
</key>
<key name="stop" type="as">
- <default>['', 'XF86AudioStop']</default>
+ <default>['']</default>
<summary>Stop playback</summary>
<description>Binding to stop playback.</description>
</key>
+
+ <!-- Change volume -->
<key name="volume-down" type="as">
- <default>['', 'XF86AudioLowerVolume']</default>
+ <default>['']</default>
<summary>Volume down</summary>
<description>Binding to lower the volume.</description>
</key>
<key name="volume-mute" type="as">
- <default>['', 'XF86AudioMute']</default>
+ <default>['']</default>
<summary>Volume mute/unmute</summary>
<description>Binding to mute/unmute the volume.</description>
</key>
<key name="volume-up" type="as">
- <default>['', 'XF86AudioRaiseVolume']</default>
+ <default>['']</default>
<summary>Volume up</summary>
<description>Binding to raise the volume.</description>
</key>
+
+ <!-- Change volume without sound effect -->
+ <key name="volume-down-quiet" type="as">
+ <default>['']</default>
+ <summary>Quiet volume down</summary>
+ <description>Binding to lower the volume without emitting a sound effect.</description>
+ </key>
+ <key name="volume-mute-quiet" type="as">
+ <default>['']</default>
+ <summary>Quiet volume mute/unmute</summary>
+ <description>Binding to mute/unmute the volume without emitting a sound effect.</description>
+ </key>
+ <key name="volume-up-quiet" type="as">
+ <default>['']</default>
+ <summary>Quiet volume up</summary>
+ <description>Binding to raise the volume without emitting a sound effect.</description>
+ </key>
+
+ <!-- Change volume with high precision -->
+ <key name="volume-down-precise" type="as">
+ <default>['']</default>
+ <summary>Precise volume down</summary>
+ <description>Binding to lower the volume with higher precision.</description>
+ </key>
+ <key name="volume-up-precise" type="as">
+ <default>['']</default>
+ <summary>Precise volume up</summary>
+ <description>Binding to raise the volume with higher precision.</description>
+ </key>
+
<key name="mic-mute" type="as">
- <default>['', 'XF86AudioMicMute']</default>
+ <default>['']</default>
<summary>Microphone mute/unmute</summary>
<description>Binding to mute/unmute the microphone.</description>
</key>
@@ -315,15 +347,10 @@
<description>Binding to record a short video of the screen</description>
</key>
<key name="www" type="as">
- <default>['', 'XF86WWW']</default>
+ <default>['']</default>
<summary>Launch web browser</summary>
<description>Binding to launch the web browser.</description>
</key>
- <key name="magnifier" type="as">
- <default>['<Alt><Super>8']</default>
- <summary>Toggle magnifier</summary>
- <description>Binding to show the screen magnifier</description>
- </key>
<key name="screenreader" type="as">
<default>['<Alt><Super>s']</default>
<summary>Toggle screen reader</summary>
@@ -349,6 +376,11 @@
<summary>Toggle contrast</summary>
<description>Binding to toggle the interface contrast</description>
</key>
+ <key name="magnifier" type="as">
+ <default>['<Alt><Super>8']</default>
+ <summary>Toggle magnifier</summary>
+ <description>Binding to show the screen magnifier</description>
+ </key>
<key name="magnifier-zoom-in" type="as">
<default>['<Alt><Super>equal']</default>
<summary>Magnifier zoom in</summary>
@@ -359,6 +391,350 @@
<summary>Magnifier zoom out</summary>
<description>Binding for the magnifier to zoom out</description>
</key>
+ <key name="touchpad-toggle" type="as">
+ <default>['']</default>
+ <summary>Toggle touchpad on/off</summary>
+ <description>Binding to toggle the touchpad on/off.</description>
+ </key>
+ <key name="touchpad-on" type="as">
+ <default>['']</default>
+ <summary>Switch touchpad on</summary>
+ <description>Binding to switch the touchpad on.</description>
+ </key>
+ <key name="touchpad-off" type="as">
+ <default>['']</default>
+ <summary>Switch touchpad off</summary>
+ <description>Binding to switch the touchpad off.</description>
+ </key>
+
+ <key name="playback-rewind" type="as">
+ <default>['']</default>
+ <summary>Skip backward in current track</summary>
+ <description>Binding to skip backward in current track.</description>
+ </key>
+ <key name="playback-forward" type="as">
+ <default>['']</default>
+ <summary>Skip forward in current track</summary>
+ <description>Binding to skip forward in in current track.</description>
+ </key>
+ <key name="playback-repeat" type="as">
+ <default>['']</default>
+ <summary>Toggle repeat playback mode</summary>
+ <description>Binding to toggle repeat mode in media player.</description>
+ </key>
+ <key name="playback-random" type="as">
+ <default>['']</default>
+ <summary>Toggle random playback mode</summary>
+ <description>Binding to toggle random playback mode in media player.</description>
+ </key>
+
+ <key name="rotate-video-lock" type="as">
+ <default>['']</default>
+ <summary>Toggle automatic screen orientation</summary>
+ <description>Binding to toggle automatic screen orientation.</description>
+ </key>
+ <key name="power" type="as">
+ <default>['']</default>
+ <summary>Power button</summary>
+ <description>Binding for power button.</description>
+ </key>
+ <key name="hibernate" type="as">
+ <default>['']</default>
+ <summary>Hibernate button</summary>
+ <description>Binding to hibernate the machine.</description>
+ </key>
+ <key name="suspend" type="as">
+ <default>['']</default>
+ <summary>Suspend button</summary>
+ <description>Binding to suspend the machine.</description>
+ </key>
+
+ <key name="screen-brightness-up" type="as">
+ <default>['']</default>
+ <summary>Screen brightness up</summary>
+ <description>Binding to increase the screen brightness.</description>
+ </key>
+ <key name="screen-brightness-down" type="as">
+ <default>['']</default>
+ <summary>Screen brightness down</summary>
+ <description>Binding to decrease the screen brightness.</description>
+ </key>
+ <key name="screen-brightness-cycle" type="as">
+ <default>['']</default>
+ <summary>Screen brightness cycle</summary>
+ <description>Binding to cycle the screen brightness.</description>
+ </key>
+
+ <key name="keyboard-brightness-up" type="as">
+ <default>['']</default>
+ <summary>Keyboard brightness up</summary>
+ <description>Binding to increase the keyboard brightness.</description>
+ </key>
+ <key name="keyboard-brightness-down" type="as">
+ <default>['']</default>
+ <summary>Keyboard brightness down</summary>
+ <description>Binding to decrease the keyboard brightness.</description>
+ </key>
+ <key name="keyboard-brightness-toggle" type="as">
+ <default>['']</default>
+ <summary>Keyboard brightness toggle</summary>
+ <description>Binding to toggle the keyboard brightness.</description>
+ </key>
+
+ <key name="battery-status" type="as">
+ <default>['']</default>
+ <summary>Show battery status</summary>
+ <description>Binding to show current battery status.</description>
+ </key>
+
+ <key name="rfkill" type="as">
+ <default>['']</default>
+ <summary>RF kill</summary>
+ <description>Binding to toggle airplane mode.</description>
+ </key>
+ <key name="rfkill-bluetooth" type="as">
+ <default>['']</default>
+ <summary>Bluetooth RF kill</summary>
+ <description>Binding to toggle bluetooth airplane mode.</description>
+ </key>
+
+ <!--
+ The following bindings are considered static versions of the above.
+ Overriding these keys will likely result in unexpected behaviour on at
+ least some hardware.
+ We assume that no user will ever modify these. It is therefore legal to
+ assume that an update of the default value will reach all users.
+ -->
+ <key name="calculator-static" type="as">
+ <default>['XF86Calculator']</default>
+ <summary>Launch calculator</summary>
+ <description>Static binding to launch the calculator.</description>
+ </key>
+ <key name="control-center-static" type="as">
+ <default>['XF86Tools']</default>
+ <summary>Launch settings</summary>
+ <description>Static binding to launch GNOME settings.</description>
+ </key>
+ <key name="email-static" type="as">
+ <default>['XF86Mail']</default>
+ <summary>Launch email client</summary>
+ <description>Static binding to launch the email client.</description>
+ </key>
+ <key name="eject-static" type="as">
+ <default>['XF86Eject']</default>
+ <summary>Eject</summary>
+ <description>Static binding to eject an optical disc.</description>
+ </key>
+ <key name="home-static" type="as">
+ <default>['XF86Explorer']</default>
+ <summary>Home folder</summary>
+ <description>Static binding to open the Home folder.</description>
+ </key>
+ <key name="media-static" type="as">
+ <default>['XF86AudioMedia']</default>
+ <summary>Launch media player</summary>
+ <description>Static binding to launch the media player.</description>
+ </key>
+ <key name="next-static" type="as">
+ <default>['XF86AudioNext', '<Ctrl>XF86AudioNext']</default>
+ <summary>Next track</summary>
+ <description>Static binding to skip to next track.</description>
+ </key>
+ <key name="pause-static" type="as">
+ <default>['XF86AudioPause']</default>
+ <summary>Pause playback</summary>
+ <description>Static binding to pause playback.</description>
+ </key>
+ <key name="play-static" type="as">
+ <default>['XF86AudioPlay', '<Ctrl>XF86AudioPlay']</default>
+ <summary>Play (or play/pause)</summary>
+ <description>Static binding to start playback (or toggle play/pause).</description>
+ </key>
+ <key name="previous-static" type="as">
+ <default>['XF86AudioPrev', '<Ctrl>XF86AudioPrev']</default>
+ <summary>Previous track</summary>
+ <description>Static binding to skip to previous track.</description>
+ </key>
+ <key name="screensaver-static" type="as">
+ <default>['XF86ScreenSaver']</default>
+ <summary>Lock screen</summary>
+ <description>Static binding to lock the screen.</description>
+ </key>
+ <key name="search-static" type="as">
+ <default>['XF86Search']</default>
+ <summary>Search</summary>
+ <description>Static binding to launch the search tool.</description>
+ </key>
+ <key name="stop-static" type="as">
+ <default>['XF86AudioStop']</default>
+ <summary>Stop playback</summary>
+ <description>Static binding to stop playback.</description>
+ </key>
+
+ <!-- Change volume, "Ctrl" is always emitted on some weird keyboards -->
+ <key name="volume-down-static" type="as">
+ <default>['XF86AudioLowerVolume', '<Ctrl>XF86AudioLowerVolume']</default>
+ <summary>Volume down</summary>
+ <description>Static binding to lower the volume.</description>
+ </key>
+ <key name="volume-mute-static" type="as">
+ <default>['XF86AudioMute']</default>
+ <summary>Volume mute/unmute</summary>
+ <description>Static binding to mute/unmute the volume.</description>
+ </key>
+ <key name="volume-up-static" type="as">
+ <default>['XF86AudioRaiseVolume', '<Ctrl>XF86AudioRaiseVolume']</default>
+ <summary>Volume up</summary>
+ <description>Static binding to raise the volume.</description>
+ </key>
+
+ <!-- Change volume without sound effect -->
+ <key name="volume-down-quiet-static" type="as">
+ <default>['<Alt>XF86AudioLowerVolume', '<Alt><Ctrl>XF86AudioLowerVolume']</default>
+ <summary>Quiet volume down</summary>
+ <description>Static binding to lower the volume without emitting a sound effect.</description>
+ </key>
+ <key name="volume-mute-quiet-static" type="as">
+ <default>['<Alt>XF86AudioMute']</default>
+ <summary>Quiet volume mute/unmute</summary>
+ <description>Static binding to mute/unmute the volume.</description>
+ </key>
+ <key name="volume-up-quiet-static" type="as">
+ <default>['<Alt>XF86AudioRaiseVolume', '<Alt><Ctrl>XF86AudioRaiseVolume']</default>
+ <summary>Quiet volume up</summary>
+ <description>Static binding to raise the volume without emitting a sound effect.</description>
+ </key>
+
+ <!-- Change volume with high precision -->
+ <key name="volume-down-precise-static" type="as">
+ <default>['<Shift>XF86AudioLowerVolume',
'<Ctrl><Shift>XF86AudioLowerVolume']</default>
+ <summary>Precise volume down</summary>
+ <description>Static binding to lower the volume with higher precision.</description>
+ </key>
+ <key name="volume-up-precise-static" type="as">
+ <default>['<Shift>XF86AudioRaiseVolume',
'<Ctrl><Shift>XF86AudioRaiseVolume']</default>
+ <summary>Precise volume up</summary>
+ <description>Static binding to raise the volume with higher precision.</description>
+ </key>
+
+ <key name="mic-mute-static" type="as">
+ <default>['XF86AudioMicMute']</default>
+ <summary>Microphone mute/unmute</summary>
+ <description>Static binding to mute/unmute the microphone.</description>
+ </key>
+ <key name="www-static" type="as">
+ <default>['XF86WWW']</default>
+ <summary>Launch web browser</summary>
+ <description>Static binding to launch the web browser.</description>
+ </key>
+
+ <key name="touchpad-toggle-static" type="as">
+ <default>['XF86TouchpadToggle', '<Ctrl><Super>XF86TouchpadToggle']</default>
+ <summary>Magnifier zoom out</summary>
+ <description>Static binding to toggle the touchpad on/off.</description>
+ </key>
+ <key name="touchpad-on-static" type="as">
+ <default>['XF86TouchpadOn']</default>
+ <summary>Switch touchpad on</summary>
+ <description>Static binding to switch the touchpad on.</description>
+ </key>
+ <key name="touchpad-off-static" type="as">
+ <default>['XF86TouchpadOff']</default>
+ <summary>Switch touchpad off</summary>
+ <description>Static binding to switch the touchpad off.</description>
+ </key>
+
+ <key name="playback-rewind-static" type="as">
+ <default>['XF86AudioRewind']</default>
+ <summary>Skip backward in current track</summary>
+ <description>Static binding to skip backward in current track.</description>
+ </key>
+ <key name="playback-forward-static" type="as">
+ <default>['XF86AudioForward']</default>
+ <summary>Skip forward in current track</summary>
+ <description>Static binding to skip forward in in current track.</description>
+ </key>
+ <key name="playback-repeat-static" type="as">
+ <default>['XF86AudioRepeat']</default>
+ <summary>Toggle repeat playback mode</summary>
+ <description>Static binding to toggle repeat mode in media player.</description>
+ </key>
+ <key name="playback-random-static" type="as">
+ <default>['XF86AudioRandomPlay']</default>
+ <summary>Toggle random playback mode</summary>
+ <description>Static binding to toggle random playback mode in media player.</description>
+ </key>
+
+ <key name="rotate-video-lock-static" type="as">
+ <default>['<Super>o']</default>
+ <summary>Toggle automatic screen orientation</summary>
+ <description>Static binding to toggle automatic screen orientation.</description>
+ </key>
+ <key name="power-static" type="as">
+ <default>['XF86PowerOff']</default>
+ <summary>Power button</summary>
+ <description>Static binding for power button.</description>
+ </key>
+ <key name="hibernate-static" type="as">
+ <default>['XF86Suspend', 'XF86Hibernate']</default>
+ <summary>Hibernate button</summary>
+ <description>Static binding to hibernate the machine.</description>
+ </key>
+ <key name="suspend-static" type="as">
+ <default>['XF86Sleep']</default>
+ <summary>Suspend button</summary>
+ <description>Static binding to suspend the machine.</description>
+ </key>
+
+ <key name="screen-brightness-up-static" type="as">
+ <default>['XF86MonBrightnessUp']</default>
+ <summary>Screen brightness up</summary>
+ <description>Static binding to increase the screen brightness.</description>
+ </key>
+ <key name="screen-brightness-down-static" type="as">
+ <default>['XF86MonBrightnessDown']</default>
+ <summary>Screen brightness down</summary>
+ <description>Static binding to decrease the screen brightness.</description>
+ </key>
+ <key name="screen-brightness-cycle-static" type="as">
+ <default>['XF86MonBrightnessCycle']</default>
+ <summary>Screen brightness cycle</summary>
+ <description>Static binding to cycle the screen brightness.</description>
+ </key>
+
+ <key name="keyboard-brightness-up-static" type="as">
+ <default>['XF86KbdBrightnessUp']</default>
+ <summary>Keyboard brightness up</summary>
+ <description>Static binding to increase the keyboard brightness.</description>
+ </key>
+ <key name="keyboard-brightness-down-static" type="as">
+ <default>['XF86KbdBrightnessDown']</default>
+ <summary>Keyboard brightness down</summary>
+ <description>Static binding to decrease the keyboard brightness.</description>
+ </key>
+ <key name="keyboard-brightness-toggle-static" type="as">
+ <default>['XF86KbdLightOnOff']</default>
+ <summary>Keyboard brightness toggle</summary>
+ <description>Static binding to toggle the keyboard brightness.</description>
+ </key>
+
+ <key name="battery-status-static" type="as">
+ <default>['XF86Battery']</default>
+ <summary>Show battery status</summary>
+ <description>Static binding to show current battery status.</description>
+ </key>
+
+ <key name="rfkill-static" type="as">
+ <default>['XF86WLAN', 'XF86UWB', 'XF86RFKill']</default>
+ <summary>RF kill</summary>
+ <description>Static binding to toggle airplane mode.</description>
+ </key>
+ <key name="rfkill-bluetooth-static" type="as">
+ <default>['XF86Bluetooth']</default>
+ <summary>Bluetooth RF kill</summary>
+ <description>Static binding to toggle bluetooth airplane mode.</description>
+ </key>
+
<key name="max-screencast-length" type="u">
<default>30</default>
<summary>Maximum length of screen recordings</summary>
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index d954c29e..0d6a49ee 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -145,7 +145,7 @@ typedef struct {
ShellActionMode modes;
MetaKeyBindingFlags grab_flags;
const char *settings_key;
- const char *hard_coded;
+ gboolean static_setting;
char *custom_path;
char *custom_command;
GArray *accel_ids;
@@ -368,8 +368,6 @@ get_key_string (MediaKey *key)
{
if (key->settings_key != NULL)
return g_strdup_printf ("settings:%s", key->settings_key);
- else if (key->hard_coded != NULL)
- return g_strdup_printf ("fixed:%s", key->hard_coded);
else if (key->custom_path != NULL)
return g_strdup_printf ("custom:%s", key->custom_path);
else
@@ -384,11 +382,30 @@ get_bindings (GsdMediaKeysManager *manager,
GPtrArray *array;
gchar *binding;
- if (key->settings_key != NULL)
- return g_settings_get_strv (priv->settings, key->settings_key);
+ if (key->settings_key != NULL) {
+ g_autofree gchar *static_settings_key = NULL;
+ g_autofree GStrv keys = NULL;
+ g_autofree GStrv static_keys = NULL;
+ gchar **item;
+
+ if (!key->static_setting)
+ return g_settings_get_strv (priv->settings, key->settings_key);
+
+ static_settings_key = g_strconcat (key->settings_key, "-static", NULL);
+ keys = g_settings_get_strv (priv->settings, key->settings_key);
+ static_keys = g_settings_get_strv (priv->settings, static_settings_key);
+
+ array = g_ptr_array_new ();
+ /* Steals all strings from the settings */
+ for (item = keys; *item; item++)
+ g_ptr_array_add (array, *item);
+ for (item = static_keys; *item; item++)
+ g_ptr_array_add (array, *item);
+ g_ptr_array_add (array, NULL);
+
+ return (GStrv) g_ptr_array_free (array, FALSE);
+ }
- if (key->hard_coded != NULL)
- binding = g_strdup (key->hard_coded);
else if (key->custom_path != NULL) {
GSettings *settings;
@@ -935,7 +952,7 @@ add_key (GsdMediaKeysManager *manager, guint i)
key = media_key_new ();
key->key_type = media_keys[i].key_type;
key->settings_key = media_keys[i].settings_key;
- key->hard_coded = media_keys[i].hard_coded;
+ key->static_setting = media_keys[i].static_setting;
key->modes = media_keys[i].modes;
key->grab_flags = media_keys[i].grab_flags;
diff --git a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h
index bdcf3343..8ced72df 100644
--- a/plugins/media-keys/shortcuts-list.h
+++ b/plugins/media-keys/shortcuts-list.h
@@ -38,82 +38,71 @@
static struct {
MediaKeyType key_type;
const char *settings_key;
- const char *hard_coded;
+ gboolean static_setting;
ShellActionMode modes;
MetaKeyBindingFlags grab_flags;
} media_keys[] = {
- { TOUCHPAD_KEY, NULL,"XF86TouchpadToggle", SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT
},
- { TOUCHPAD_KEY, NULL,"<Ctrl><Super>XF86TouchpadToggle", SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { TOUCHPAD_ON_KEY, NULL, "XF86TouchpadOn", SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT
},
- { TOUCHPAD_OFF_KEY, NULL, "XF86TouchpadOff", SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { MUTE_KEY, "volume-mute", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { VOLUME_DOWN_KEY, "volume-down", NULL, SHELL_ACTION_MODE_ALL },
- { VOLUME_DOWN_KEY, NULL, "<Ctrl>XF86AudioLowerVolume", SHELL_ACTION_MODE_ALL },
- { VOLUME_UP_KEY, "volume-up", NULL, SHELL_ACTION_MODE_ALL },
- { VOLUME_UP_KEY, NULL, "<Ctrl>XF86AudioRaiseVolume", SHELL_ACTION_MODE_ALL },
- { MIC_MUTE_KEY, "mic-mute", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { MUTE_QUIET_KEY, NULL, "<Alt>XF86AudioMute", SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { VOLUME_DOWN_QUIET_KEY, NULL, "<Alt>XF86AudioLowerVolume", SHELL_ACTION_MODE_ALL },
- { VOLUME_UP_QUIET_KEY, NULL, "<Alt>XF86AudioRaiseVolume", SHELL_ACTION_MODE_ALL },
- { VOLUME_DOWN_PRECISE_KEY, NULL, "<Shift>XF86AudioLowerVolume", SHELL_ACTION_MODE_ALL },
- { VOLUME_UP_PRECISE_KEY, NULL, "<Shift>XF86AudioRaiseVolume", SHELL_ACTION_MODE_ALL },
- { LOGOUT_KEY, "logout", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { EJECT_KEY, "eject", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { HOME_KEY, "home", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { MEDIA_KEY, "media", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { CALCULATOR_KEY, "calculator", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SEARCH_KEY, "search", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { EMAIL_KEY, "email", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { CONTROL_CENTER_KEY, "control-center", NULL, GSD_ACTION_MODE_LAUNCHER,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SCREENSAVER_KEY, "screensaver", NULL, SCREENSAVER_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SCREENSAVER_KEY, NULL, "XF86ScreenSaver", SCREENSAVER_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { HELP_KEY, "help", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { HELP_KEY, NULL, "<Super>F1", GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SCREENSHOT_KEY, "screenshot", NULL, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { WINDOW_SCREENSHOT_KEY, "window-screenshot", NULL, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT
},
- { AREA_SCREENSHOT_KEY, "area-screenshot", NULL, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SCREENSHOT_CLIP_KEY, "screenshot-clip", NULL, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { WINDOW_SCREENSHOT_CLIP_KEY, "window-screenshot-clip", NULL, SHELL_ACTION_MODE_NORMAL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { AREA_SCREENSHOT_CLIP_KEY, "area-screenshot-clip", NULL, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SCREENCAST_KEY, "screencast", NULL, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { WWW_KEY, "www", NULL, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { PLAY_KEY, "play", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { PLAY_KEY, NULL, "<Ctrl>XF86AudioPlay", SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { PAUSE_KEY, "pause", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { STOP_KEY, "stop", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { PREVIOUS_KEY, "previous", NULL, SHELL_ACTION_MODE_ALL },
- { PREVIOUS_KEY, NULL, "<Ctrl>XF86AudioPrev", SHELL_ACTION_MODE_ALL },
- { NEXT_KEY, "next", NULL, SHELL_ACTION_MODE_ALL },
- { NEXT_KEY, NULL, "<Ctrl>XF86AudioNext", SHELL_ACTION_MODE_ALL },
- { REWIND_KEY, NULL, "XF86AudioRewind", SHELL_ACTION_MODE_ALL },
- { FORWARD_KEY, NULL, "XF86AudioForward", SHELL_ACTION_MODE_ALL },
- { REPEAT_KEY, NULL, "XF86AudioRepeat", SHELL_ACTION_MODE_ALL },
- { RANDOM_KEY, NULL, "XF86AudioRandomPlay", SHELL_ACTION_MODE_ALL },
- { ROTATE_VIDEO_LOCK_KEY, NULL, "<Super>o", SHELL_ACTION_MODE_ALL },
- { MAGNIFIER_KEY, "magnifier", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SCREENREADER_KEY, "screenreader", NULL, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT
},
- { ON_SCREEN_KEYBOARD_KEY, "on-screen-keyboard", NULL, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { INCREASE_TEXT_KEY, "increase-text-size", NULL, SHELL_ACTION_MODE_ALL },
- { DECREASE_TEXT_KEY, "decrease-text-size", NULL, SHELL_ACTION_MODE_ALL },
- { TOGGLE_CONTRAST_KEY, "toggle-contrast", NULL, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { MAGNIFIER_ZOOM_IN_KEY, "magnifier-zoom-in", NULL, SHELL_ACTION_MODE_ALL },
- { MAGNIFIER_ZOOM_OUT_KEY, "magnifier-zoom-out", NULL, SHELL_ACTION_MODE_ALL },
- { POWER_KEY, NULL, "XF86PowerOff", POWER_KEYS_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { TOUCHPAD_KEY, "touchpad-toggle", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { TOUCHPAD_ON_KEY, "touchpad-on", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { TOUCHPAD_OFF_KEY, "touchpad-off", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT
},
+ { MUTE_KEY, "volume-mute", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { VOLUME_DOWN_KEY, "volume-down", TRUE, SHELL_ACTION_MODE_ALL },
+ { VOLUME_UP_KEY, "volume-up", TRUE, SHELL_ACTION_MODE_ALL },
+ { MIC_MUTE_KEY, "mic-mute", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { MUTE_QUIET_KEY, "volume-mute-quiet", TRUE, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { VOLUME_DOWN_QUIET_KEY, "volume-down-quiet", TRUE, SHELL_ACTION_MODE_ALL },
+ { VOLUME_UP_QUIET_KEY, "volume-up-quiet", TRUE, SHELL_ACTION_MODE_ALL },
+ { VOLUME_DOWN_PRECISE_KEY, "volume-down-precise", TRUE, SHELL_ACTION_MODE_ALL },
+ { VOLUME_UP_PRECISE_KEY, "volume-up-precise", TRUE, SHELL_ACTION_MODE_ALL },
+ { LOGOUT_KEY, "logout", FALSE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { EJECT_KEY, "eject", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { HOME_KEY, "home", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { MEDIA_KEY, "media", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { CALCULATOR_KEY, "calculator", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { SEARCH_KEY, "search", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { EMAIL_KEY, "email", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { CONTROL_CENTER_KEY, "control-center", TRUE, GSD_ACTION_MODE_LAUNCHER,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { SCREENSAVER_KEY, "screensaver", TRUE, SCREENSAVER_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { HELP_KEY, "help", FALSE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { SCREENSHOT_KEY, "screenshot", FALSE, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { WINDOW_SCREENSHOT_KEY, "window-screenshot", FALSE, NO_LOCK_MODE,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { AREA_SCREENSHOT_KEY, "area-screenshot", FALSE, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { SCREENSHOT_CLIP_KEY, "screenshot-clip", FALSE, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { WINDOW_SCREENSHOT_CLIP_KEY, "window-screenshot-clip", FALSE, SHELL_ACTION_MODE_NORMAL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { AREA_SCREENSHOT_CLIP_KEY, "area-screenshot-clip", FALSE, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { SCREENCAST_KEY, "screencast", FALSE, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { WWW_KEY, "www", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { PLAY_KEY, "play", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { PAUSE_KEY, "pause", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { STOP_KEY, "stop", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { PREVIOUS_KEY, "previous", TRUE, SHELL_ACTION_MODE_ALL },
+ { NEXT_KEY, "next", TRUE, SHELL_ACTION_MODE_ALL },
+ { REWIND_KEY, "playback-rewind", TRUE, SHELL_ACTION_MODE_ALL },
+ { FORWARD_KEY, "playback-forward", TRUE, SHELL_ACTION_MODE_ALL },
+ { REPEAT_KEY, "playback-repeat", TRUE, SHELL_ACTION_MODE_ALL },
+ { RANDOM_KEY, "playback-random", TRUE, SHELL_ACTION_MODE_ALL },
+ { ROTATE_VIDEO_LOCK_KEY, "rotate-video-lock", TRUE, SHELL_ACTION_MODE_ALL },
+ { MAGNIFIER_KEY, "magnifier", FALSE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { SCREENREADER_KEY, "screenreader", FALSE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT
},
+ { ON_SCREEN_KEYBOARD_KEY, "on-screen-keyboard", FALSE, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { INCREASE_TEXT_KEY, "increase-text-size", FALSE, SHELL_ACTION_MODE_ALL },
+ { DECREASE_TEXT_KEY, "decrease-text-size", FALSE, SHELL_ACTION_MODE_ALL },
+ { TOGGLE_CONTRAST_KEY, "toggle-contrast", FALSE, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { MAGNIFIER_ZOOM_IN_KEY, "magnifier-zoom-in", FALSE, SHELL_ACTION_MODE_ALL },
+ { MAGNIFIER_ZOOM_OUT_KEY, "magnifier-zoom-out", FALSE, SHELL_ACTION_MODE_ALL },
+ { POWER_KEY, "power", TRUE, POWER_KEYS_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
/* the kernel / Xorg names really are like this... */
- { SLEEP_KEY, NULL, "XF86Suspend", POWER_KEYS_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SUSPEND_KEY, NULL, "XF86Sleep", POWER_KEYS_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { HIBERNATE_KEY, NULL, "XF86Hibernate", POWER_KEYS_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { SCREEN_BRIGHTNESS_UP_KEY, NULL, "XF86MonBrightnessUp", SHELL_ACTION_MODE_ALL },
- { SCREEN_BRIGHTNESS_DOWN_KEY, NULL, "XF86MonBrightnessDown", SHELL_ACTION_MODE_ALL },
- { SCREEN_BRIGHTNESS_CYCLE_KEY, NULL, "XF86MonBrightnessCycle", SHELL_ACTION_MODE_ALL },
- { KEYBOARD_BRIGHTNESS_UP_KEY, NULL, "XF86KbdBrightnessUp", SHELL_ACTION_MODE_ALL },
- { KEYBOARD_BRIGHTNESS_DOWN_KEY, NULL, "XF86KbdBrightnessDown", SHELL_ACTION_MODE_ALL },
- { KEYBOARD_BRIGHTNESS_TOGGLE_KEY, NULL, "XF86KbdLightOnOff", SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { BATTERY_KEY, NULL, "XF86Battery", GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { RFKILL_KEY, NULL, "XF86WLAN", GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { RFKILL_KEY, NULL, "XF86UWB", GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { RFKILL_KEY, NULL, "XF86RFKill", GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
- { BLUETOOTH_RFKILL_KEY, NULL, "XF86Bluetooth", GSD_ACTION_MODE_LAUNCHER,
META_KEY_BINDING_IGNORE_AUTOREPEAT}
+ { SUSPEND_KEY, "suspend", TRUE, POWER_KEYS_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { HIBERNATE_KEY, "hibernate", TRUE, POWER_KEYS_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { SCREEN_BRIGHTNESS_UP_KEY, "screen-brightness-up", TRUE, SHELL_ACTION_MODE_ALL },
+ { SCREEN_BRIGHTNESS_DOWN_KEY, "screen-brightness-down", TRUE, SHELL_ACTION_MODE_ALL },
+ { SCREEN_BRIGHTNESS_CYCLE_KEY, "screen-brightness-cycle", TRUE, SHELL_ACTION_MODE_ALL },
+ { KEYBOARD_BRIGHTNESS_UP_KEY, "keyboard-brightness-up", TRUE, SHELL_ACTION_MODE_ALL },
+ { KEYBOARD_BRIGHTNESS_DOWN_KEY, "keyboard-brightness-down", TRUE, SHELL_ACTION_MODE_ALL },
+ { KEYBOARD_BRIGHTNESS_TOGGLE_KEY, "keyboard-brightness-toggle", TRUE, SHELL_ACTION_MODE_ALL,
META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { BATTERY_KEY, "battery-status", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT
},
+ { RFKILL_KEY, "rfkill", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
+ { BLUETOOTH_RFKILL_KEY, "rfkill-bluetooth", TRUE, GSD_ACTION_MODE_LAUNCHER,
META_KEY_BINDING_IGNORE_AUTOREPEAT}
};
#undef SCREENSAVER_MODE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]