summaryrefslogtreecommitdiff
path: root/plugins/common/eggaccelerators.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/common/eggaccelerators.c')
-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;