diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-10-19 10:49:37 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-10-20 09:23:50 +1000 |
commit | afdc9ceee707cba3164f892fc3309140480c9b82 (patch) | |
tree | 2e85593d1e71fec8a20d37b2188bc88312f3c8a5 /test/data/symbols/garbage | |
parent | 21e640fbc7ec2e53244e4e531ae7c32f249b023f (diff) | |
download | xorg-lib-libxkbcommon-afdc9ceee707cba3164f892fc3309140480c9b82.tar.gz |
xkbcomp: where a keysym cannot be resolved, set it to NoSymbol
Where resolve_keysym fails we warn but use the otherwise uninitialized variable
as our keysym. That later ends up in the keymap as random garbage hex value.
Simplest test case, set this in the 'us' keymap:
key <TLDE> { [ xyz ] };
And without this patch we get random garbage:
./build/xkbcli-compile-keymap --layout us | grep TLDE:
key <TLDE> { [ 0x018a5cf0 ] };
With this patch, we now get NoSymbol:
./build/xkbcli-compile-keymap --layout us | grep TLDE:
key <TLDE> { [ NoSymbol ] };
Diffstat (limited to 'test/data/symbols/garbage')
-rw-r--r-- | test/data/symbols/garbage | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/data/symbols/garbage b/test/data/symbols/garbage new file mode 100644 index 0000000..98c5e28 --- /dev/null +++ b/test/data/symbols/garbage @@ -0,0 +1,14 @@ +default alphanumeric_keys +xkb_symbols "garbage" { + include "us" + + name[Group1]= "My garbage Layout"; + + // The garbage keysym will *not* override the corresponding symbol from the + // 'us' layout + key <TLDE> { [ keysym_is_garbage, exclam ] }; + + // AE13 is unused by 'us', use it to avoid fallback to the 'us' definition. + // Define with 2 levels but first level is a garbage symbol. + key <AE13> { [ keysym_is_garbage, asciitilde ] }; +}; |