summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-08 14:13:06 -0300
committerPerberos <[email protected]>2011-12-08 14:13:06 -0300
commiteb986a271cb90e22c42c5a789bf414987a3f22b1 (patch)
tree14f6e878a50a8639d4dc81c65aa3b5ab19debc6a
parent80bf2f97b9d1c11592c29836b3f960d788464987 (diff)
downloadmate-settings-daemon-eb986a271cb90e22c42c5a789bf414987a3f22b1.tar.bz2
mate-settings-daemon-eb986a271cb90e22c42c5a789bf414987a3f22b1.tar.xz
fixing issue with <Control> key at keybinding
-rw-r--r--plugins/common/eggaccelerators.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/common/eggaccelerators.c b/plugins/common/eggaccelerators.c
index e3b8ae3..d92f536 100644
--- a/plugins/common/eggaccelerators.c
+++ b/plugins/common/eggaccelerators.c
@@ -177,6 +177,19 @@ is_hyper (const gchar *string)
(string[6] == '>'));
}
+static inline gboolean is_primary(const gchar* string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'p' || string[1] == 'P') &&
+ (string[2] == 'r' || string[2] == 'R') &&
+ (string[3] == 'i' || string[3] == 'I') &&
+ (string[4] == 'm' || string[4] == 'M') &&
+ (string[5] == 'a' || string[5] == 'A') &&
+ (string[6] == 'r' || string[6] == 'R') &&
+ (string[7] == 'y' || string[7] == 'Y') &&
+ (string[8] == '>'));
+}
+
static inline gboolean
is_keycode (const gchar *string)
{
@@ -246,6 +259,12 @@ egg_accelerator_parse_virtual (const gchar *accelerator,
len -= 9;
mods |= EGG_VIRTUAL_RELEASE_MASK;
}
+ else if (len >= 9 && is_primary (accelerator))
+ {
+ accelerator += 9;
+ len -= 9;
+ mods |= EGG_VIRTUAL_CONTROL_MASK;
+ }
else if (len >= 9 && is_control (accelerator))
{
accelerator += 9;