libxkbcommon/test/data
Wismill 5b5b67f28c
Add support for modmap None (#291)
Unlike current xkbcommon, X11’s xkbcomp allows to remove entries in
the modifiers’ map using “modifier_map None { … }”.

“None” is translated to the special value “XkbNoModifier” defined in
“X11/extensions/XKB.h”. Then it relies on the fact that in "CopyModMapDef",
the following code:

    1U << entry->modifier

ends up being zero when “entry->modifier” is “XkbNoModifier” (i.e. 0xFF).
Indeed, it relies on the overflow behaviour of the left shift, which in
practice resolves to use only the 5 low bits of the shift amount, i.e.
0x1F here. Then the result of “1U << 0xFF” is cast to “char”, i.e. 0.

This is a good trick but too magical, so in libxkbcommon we will use
an explicit test against our new constant XKB_MOD_NONE.
2023-05-01 23:30:41 +03:00
..
compat test/data: sync to xkeyboard-config 2.13 2014-10-17 01:19:03 +03:00
keycodes test/data: sync from xkeyboard-config 2.30 2020-09-07 11:36:49 +03:00
keymaps Add support for modmap None (#291) 2023-05-01 23:30:41 +03:00
locale tests/data: add files needed to fully test compose 2021-05-22 19:58:40 +03:00
rules test/data: add rule registry files 2020-09-07 11:47:34 +03:00
symbols xkbcomp: where a keysym cannot be resolved, set it to NoSymbol 2020-10-20 09:23:50 +10:00
types test/data: sync from xkeyboard-config 2.30 2020-09-07 11:36:49 +03:00
.gitattributes test/data: ensure files are checked out with LF, not CRLF 2019-12-28 15:59:47 +02:00
sync.sh tests/data: add files needed to fully test compose 2021-05-22 19:58:40 +03:00