libxkbcommon/test
Ran Benita a0a41332cc state: allow different modes for calculating consumed modifiers
The current functions dealing with consumed modifiers use the
traditional XKB definition of consumed modifiers (see description in the
added documentation). However, for several users of the library (e.g.
GTK) this definition is unsuitable or too eager. This is exacerbated by
some less-than-ideal xkeyboard-config type definitions (CTRL+ALT seems
to cause most grief...).

So, because we
- want to enable alternative interpretations, but
- don't want to expose too much internal details, and
- want to keep things simple for all library users,
we add a high-level "mode" parameter which selects the desired
interpretation. New ones can be added as long as they make some sense.

All of the old consumed-modifiers functions keep using the traditional
("XKB") mode. I mark xkb_state_mod_mask_remove_consumed() and as
deprecated without adding a *2 variant because I don't it is very useful
(or used) in practice.

Alternative modes are added in subsequent commits (this commit only adds
a mode for the existing behavior).

https://github.com/xkbcommon/libxkbcommon/issues/17

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-10-31 12:52:26 +02:00
..
data test/x11comp: remove duplicate FOUR_LEVEL_KEYPAD from test keymap 2015-08-23 23:16:37 +03:00
.gitignore test: Add interactive-wayland 2016-04-12 12:15:04 +01:00
atom.c Fix sign-compare warnings 2014-02-08 00:54:53 +02:00
buffercomp.c keymap: add xkb_keymap_new_from_buffer() 2013-04-01 18:04:06 +01:00
common.c state: allow different modes for calculating consumed modifiers 2016-10-31 12:52:26 +02:00
compose.c compose: correctly parse modifier syntax 2015-03-24 16:49:47 +02:00
context.c atom: really work with non-NUL-terminated strings 2013-07-22 11:02:20 +03: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 keycodes: fix keymap compilation with no aliases and malloc(0)==NULL 2014-09-10 13:44:33 +03:00
interactive-evdev.c state: allow different modes for calculating consumed modifiers 2016-10-31 12:52:26 +02:00
interactive-wayland.c state: allow different modes for calculating consumed modifiers 2016-10-31 12:52:26 +02:00
interactive-x11.c state: allow different modes for calculating consumed modifiers 2016-10-31 12:52:26 +02:00
keymap.c keymap: add xkb_keymap_key_by_name(), xkb_keymap_key_get_name(), tests 2016-01-20 23:17:10 +02:00
keyseq.c test/keyseq: test 'map[None] = Level2;' scenario 2014-10-17 01:19:22 +03:00
keysym.c keysym: add xkb_keysym_to_{lower,upper} 2013-08-15 09:58:50 +03:00
log.c test: Use test_get_context() in log.c 2013-03-19 10:34:28 +00:00
print-compiled-keymap.c test: Add flags argument to test_get_context() 2013-03-19 10:28:23 +00:00
rmlvo-to-kccgst.c test/rmlvo-to-kccgst: use default RMLVO values in translation 2014-02-10 13:15:58 +02:00
rules-file.c Move benchmarks from tests to their own files in bench/ 2014-10-02 22:03:28 +03:00
rulescomp.c Move benchmarks from tests to their own files in bench/ 2014-10-02 22:03:28 +03:00
state.c test/state: move wrongly-placed assert 2016-10-22 20:13:11 +03:00
stringcomp.c xkbcomp: escape the section names before storing them in the keymap 2013-07-18 14:50:21 +03:00
symbols-leak-test.bash test/symbols-leak-test: use more portable shebang 2016-06-09 15:00:43 +03:00
test.h state: allow different modes for calculating consumed modifiers 2016-10-31 12:52:26 +02:00
utf8.c Add utf8.{c,h} for common UTF-8 util functions 2014-03-22 02:10:28 +02:00
x11.c api: deprecate XKB_MAP_COMPILE_PLACEHOLDER, and use KEYMAP instead of MAP 2014-02-08 16:40:20 +02:00
x11comp.c test/x11comp: fix memory leak 2016-03-13 23:17:23 +02:00