From effb6217301ea3c63341fc8998f462e0ecacb11a Mon Sep 17 00:00:00 2001 From: Diego Nieto Cid Date: Sat, 31 Jul 2010 01:51:47 -0300 Subject: Rule vmod returns an int with the vmod's bit on. This allows to combine virtual modifiers safely. --- console-client/xkb/parser.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'console-client/xkb') diff --git a/console-client/xkb/parser.y b/console-client/xkb/parser.y index 328fa606..d6e27c79 100644 --- a/console-client/xkb/parser.y +++ b/console-client/xkb/parser.y @@ -315,7 +315,10 @@ vmods_def: /* Return the number of the virtual modifier. */ vmod: - IDENTIFIER { $$ = vmod_find ($1); } + IDENTIFIER + { if (($$ = vmod_find ($1)) != 0) + $$ = 1 << ($$ - 1); + } ; /* A single realmodifier. */ -- cgit v1.2.3