From e4b4d6b0510075fe62234f66185bf619c70fc126 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 3 Mar 2012 23:42:44 +0200 Subject: [PATCH] Fix "Could not resolve keysym" errors On many layouts, the following error appears: Internal error: Could not resolve keysym 10005b0 (Which is like the trademark of libxkbcommon now, and makes unicode-heavy symbol files pretty useless). This occurs when a keysym string (in this case, 10005b0) is passed to xkb_string_to_keysym, but cannot be resolved. This in turn happens because the parser passes on hexadecimal keysym strings without the leading "0x", thus leaving the resolving function without a way to disambiguate it as a number. Therefore, make sure to pass on the "0x". The file symbols.c in xkbcomp project does the same; it probably got lost in translation. Signed-off-by: Ran Benita --- src/xkbcomp/xkbparse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xkbcomp/xkbparse.y b/src/xkbcomp/xkbparse.y index 5a6e45f..d08408a 100644 --- a/src/xkbcomp/xkbparse.y +++ b/src/xkbcomp/xkbparse.y @@ -731,7 +731,7 @@ KeySym : IDENT { $$= strdup(scanBuf); } } else { $$= malloc(17); - snprintf($$, 17, "%x", $1); + snprintf($$, 17, "0x%x", $1); } } ; -- 2.7.4