libxkbcommon/test
Ran Benita 860cfc039f keymap: don't forget about fallback mappings in xkb_keymap_key_get_mods_for_level()
If the active set of modifiers doesn't match any explicit entry of the
key type, the resulting level is 0 (i.e. Level 1). Some key types don't
explicitly map Level 1, taking advantage of this fallback.

Previously, xkb_keymap_key_get_mods_for_level didn't consider this, and
only reported masks for explicit mappings. But this causes some glaring
omissions, like matching "a" in the "us" keymap returning not results.

Since every mask which isn't explicitly mapped falls back to 0, we can't
return the all. Almost always the best choice for this is the empty
mask, so return that, when applicable.

Fixes https://github.com/xkbcommon/libxkbcommon/issues/140.
Reported-by: https://github.com/AliKet
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-04-18 22:23:06 +03:00
..
data test/data: ensure files are checked out with LF, not CRLF 2019-12-28 15:59:47 +02:00
.gitignore test: add a tool to test-compile all LVO combinations from xkeyboard-config 2018-08-21 11:30:45 +10:00
atom.c test/atom: use correct format specifier for size_t 2019-12-28 14:13:52 +02:00
buffercomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
common.c MSVC: Provide implementations of test_{dis,en}able_stdin_echo 2019-12-28 16:12:15 +02:00
compose.c Open files in binary mode 2019-12-28 13:49:40 +02:00
context.c MSVC: Use <io.h> as an alternative for <unistd.h> 2019-12-28 16:12:15 +02:00
evdev-scancodes.h test: make most tests portable by copying linux/input.h locally 2014-09-06 11:29:15 +03:00
filecomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
how-to-type.c test/how-to-type: some code fixes/improvements 2020-03-21 12:56:13 +02:00
interactive-evdev.c test: use flag instead of hardcoded value in examples 2020-03-25 10:43:41 +02:00
interactive-wayland.c test: use flag instead of hardcoded value in examples 2020-03-25 10:43:41 +02:00
interactive-x11.c test: use flag instead of hardcoded value in examples 2020-03-25 10:43:41 +02:00
keymap.c keymap: don't forget about fallback mappings in xkb_keymap_key_get_mods_for_level() 2020-04-18 22:23:06 +03:00
keyseq.c build: include config.h manually 2019-12-27 13:09:11 +02:00
keysym.c Support translation Unicode codepoints to keysyms 2020-02-24 09:54:09 +02:00
log.c Only add GCC diagnostic pragmas when compiler is GCC compatible 2019-12-27 15:20:25 +02:00
print-compiled-keymap.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rmlvo-to-kccgst.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rmlvo-to-keymap.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rules-file-includes.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rules-file.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rulescomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
state.c build: include config.h manually 2019-12-27 13:09:11 +02:00
stringcomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
symbols-leak-test.bash travis: improve configuration and add macOS 2019-07-25 14:34:17 +03:00
test.h MSVC: Provide implementations of [un]setenv() 2019-12-28 16:12:15 +02:00
utf8.c build: include config.h manually 2019-12-27 13:09:11 +02:00
x11.c build: include config.h manually 2019-12-27 13:09:11 +02:00
x11comp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
xkeyboard-config-test.py.in test: xkeyboard-config: bring back the progress bar 2019-11-01 10:45:43 +02:00