keysym: add xkb_keysym_to_{lower,upper} to public API
authorRan Benita <ran234@gmail.com>
Mon, 11 Dec 2017 20:41:55 +0000 (22:41 +0200)
committerRan Benita <ran234@gmail.com>
Mon, 11 Dec 2017 21:01:18 +0000 (23:01 +0200)
commit18d6aebec003c2de7957f3c94fdc24edf533d084
tree4f0029cc618278a5264990067e7a622934c12933
parent6456835f1c547e4f9da3dc8728d1fe09eeca8593
keysym: add xkb_keysym_to_{lower,upper} to public API

These can be useful in some odd cases.

There is already an implementation (+ tests) for internal use, so all
that's needed is to export them.

If xkbcommon were to provide a way to convert a Unicode codepoint to a
keysym, this could have been implemented externally as follows:

    uint32_t codepoint = xkb_keysym_to_utf32(keysym);
    uint32_t upper_codepoint = my_unicode_library_to_upper(codepoint);
    xkb_keysym_t upper_keysym = theoretical_xkb_keysym_from_utf32(upper_codepoint);

However keysym -> codepoint is not injective so such a function is not
possible strictly speaking.

Signed-off-by: Ran Benita <ran234@gmail.com>
NEWS
src/keysym.c
src/keysym.h
xkbcommon.map
xkbcommon/xkbcommon.h