Add xkb_keysym_from_name() flags argument for case-insensitive search
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 16 Oct 2012 14:05:34 +0000 (16:05 +0200)
committerRan Benita <ran234@gmail.com>
Tue, 16 Oct 2012 19:29:09 +0000 (21:29 +0200)
commit7b3bd11f92f0bed76f25eab8c79c0eca21e037bc
tree006662df88956808da70985418e1e0f8025a298a
parent5fff637e07d75b24f778210e7838ee9667810806
Add xkb_keysym_from_name() flags argument for case-insensitive search

This adds a flags argument to xkb_keysym_from_name() so we can perform a
case-insensitive search. This should really be supported as many keysyms
have really weird capitalization-rules.

However, as this may produce conflicts, users must be warned to only use
this for fallback paths or error-recovery. This is also the reason why the
internal XKB parsers still use the case-sensitive search.

This also adds some test-cases so the expected results are really
produced. The binary-size does _not_ change with this patch. However,
case-sensitive search may be slightly slower with this patch. But this is
barely measurable.

[ran: use bool instead of int for icase, add a recommendation to the
doc, and test a couple "thorny" cases.]

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
makekeys.py
src/keysym.c
src/xkbcomp/expr.c
src/xkbcomp/symbols.c
test/keyseq.c
test/keysym.c
xkbcommon/xkbcommon.h