diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/media-keys/acme.h | 4 | ||||
-rw-r--r-- | plugins/media-keys/msd-media-keys-manager.c | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/plugins/media-keys/acme.h b/plugins/media-keys/acme.h index a1cc5c1..be277ed 100644 --- a/plugins/media-keys/acme.h +++ b/plugins/media-keys/acme.h @@ -27,6 +27,8 @@ enum { TOUCHPAD_KEY, + TOUCHPAD_ON_KEY, + TOUCHPAD_OFF_KEY, MUTE_KEY, VOLUME_DOWN_KEY, VOLUME_UP_KEY, @@ -63,6 +65,8 @@ static struct { Key *key; } keys[HANDLED_KEYS] = { { TOUCHPAD_KEY, "touchpad", NULL, NULL }, + { TOUCHPAD_ON_KEY, NULL, "XF86TouchpadOn", NULL }, + { TOUCHPAD_OFF_KEY, NULL, "XF86TouchpadOff", NULL }, { MUTE_KEY, "volume-mute", NULL, NULL }, { VOLUME_DOWN_KEY, "volume-down", NULL, NULL }, { VOLUME_UP_KEY, "volume-up", NULL, NULL }, diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index 3a7a4e6..fbca896 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -586,6 +586,15 @@ do_eject_action (MsdMediaKeysManager *manager) } static void +do_touchpad_osd_action (MsdMediaKeysManager *manager, gboolean state) +{ + dialog_init (manager); + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + state ? "touchpad-enabled" : "touchpad-disabled", + FALSE); + dialog_show (manager); +} +static void do_touchpad_action (MsdMediaKeysManager *manager) { GSettings *settings = g_settings_new (TOUCHPAD_SCHEMA); @@ -930,6 +939,12 @@ do_action (MsdMediaKeysManager *manager, case TOUCHPAD_KEY: do_touchpad_action (manager); break; + case TOUCHPAD_ON_KEY: + do_touchpad_osd_action(manager, TRUE); + break; + case TOUCHPAD_OFF_KEY: + do_touchpad_osd_action(manager, FALSE); + break; case MUTE_KEY: case VOLUME_DOWN_KEY: case VOLUME_UP_KEY: |