.travis.yml | 12 Makefile.am | 5 NEWS | 55 - configure.ac | 6 doc/Doxyfile.in | 12 doc/quick-guide.md | 4 src/darray.h | 11 src/keymap-priv.c | 50 src/keymap.c | 32 src/keymap.h | 50 src/keysym.c | 2 src/state.c | 80 + src/text.c | 30 src/text.h | 10 src/utils.h | 9 src/x11/keymap.c | 39 src/x11/util.c | 8 src/xkbcomp/action.c | 237 ++-- src/xkbcomp/action.h | 11 src/xkbcomp/ast-build.c | 20 src/xkbcomp/compat.c | 202 ++-- src/xkbcomp/expr.c | 33 src/xkbcomp/expr.h | 10 src/xkbcomp/keycodes.c | 137 +- src/xkbcomp/keymap-dump.c | 35 src/xkbcomp/keymap.c | 26 src/xkbcomp/parser-priv.h | 2 src/xkbcomp/parser.y | 35 src/xkbcomp/rules.c | 11 src/xkbcomp/scanner.c | 1 src/xkbcomp/symbols.c | 231 ++-- src/xkbcomp/types.c | 187 +-- src/xkbcomp/vmod.c | 37 src/xkbcomp/vmod.h | 4 test/.gitignore | 1 test/data/keymaps/host.xkb | 1683 +++++++++++++++++++++++++++++++++ test/data/keymaps/syntax-error.xkb | 1814 ++++++++++++++++++++++++++++++++++++ test/data/keymaps/syntax-error2.xkb | 7 test/filecomp.c | 2 test/interactive-evdev.c | 5 test/state.c | 70 + test/x11comp.c | 163 +++ xkbcommon/xkbcommon-x11.h | 1 xkbcommon/xkbcommon.h | 70 + 44 files changed, 4729 insertions(+), 721 deletions(-)
New commits: commit 76016d5121daff3391c76313a8c609a985c1eb03 Author: Ran Benita <ran...@gmail.com> Date: Tue Aug 19 20:11:35 2014 +0300 Bump version to 0.4.3 Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/configure.ac b/configure.ac index 5406551..ee94581 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure. # Initialize Autoconf AC_PREREQ([2.62]) -AC_INIT([libxkbcommon], [0.4.2], +AC_INIT([libxkbcommon], [0.4.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=libxkbcommon], [libxkbcommon], [http://xkbcommon.org]) AC_CONFIG_SRCDIR([Makefile.am]) commit 537c1700d63e65f050acf6e152628d9ca7f5c7d4 Author: Ran Benita <ran...@gmail.com> Date: Tue Aug 19 20:11:06 2014 +0300 Update NEWS Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/NEWS b/NEWS index 8b1976d..4dab3ae 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +libxkbcommon 0.4.3 - 2014-08-19 +================== + +- Fixed a bug which caused xkb_x11_keymap_new_from_device() to misrepresent + modifiers for some keymaps. + + https://github.com/xkbcommon/libxkbcommon/issues/9 + +- Fixed a bug which caused xkb_x11_keymap_new_from_device() to ignore XKB + PrivateAction's. + +- Modifiers are now always fully resolved after xkb_state_update_mask(). + Previously the given state components were used as-is, without + considering virtual modifier mappings. + Note: this only affects non-standard uses of xkb_state_update_mask(). + +- Added a test for xkbcommon-x11, "x11comp". The test uses the system's + Xvfb server and xkbcomp. If they do not exist or fail, the test is + skipped. + +- Fixed memory leaks after parse errors in the XKB yacc parser. + The fix required changes which are currently incompatible with byacc. + libxkbcommon 0.4.2 - 2014-05-15 ================== commit f3597f1b62d483fadd0552bbc70614d73e6322d0 Author: Ran Benita <ran...@gmail.com> Date: Mon Aug 18 21:03:06 2014 +0300 test/state: add test_update_mask() test Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/test/state.c b/test/state.c index 2164d6b..aa70f39 100644 --- a/test/state.c +++ b/test/state.c @@ -297,6 +297,75 @@ test_serialisation(struct xkb_keymap *keymap) } static void +test_update_mask_mods(struct xkb_keymap *keymap) +{ + struct xkb_state *state = xkb_state_new(keymap); + xkb_mod_index_t caps, shift, num, alt, mod1, mod2; + enum xkb_state_component changed; + + assert(state); + + caps = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_CAPS); + assert(caps != XKB_MOD_INVALID); + shift = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_SHIFT); + assert(shift != XKB_MOD_INVALID); + num = xkb_keymap_mod_get_index(keymap, "NumLock"); + assert(num != XKB_MOD_INVALID); + alt = xkb_keymap_mod_get_index(keymap, "Alt"); + assert(alt != XKB_MOD_INVALID); + mod1 = xkb_keymap_mod_get_index(keymap, "Mod1"); + assert(mod1 != XKB_MOD_INVALID); + mod2 = xkb_keymap_mod_get_index(keymap, "Mod2"); + assert(mod2 != XKB_MOD_INVALID); + + changed = xkb_state_update_mask(state, 1 << caps, 0, 0, 0, 0, 0); + assert(changed == (XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_EFFECTIVE)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_EFFECTIVE) == + (1u << caps)); + + changed = xkb_state_update_mask(state, (1 << caps), 0, (1 << shift), 0, 0, 0); + assert(changed == (XKB_STATE_MODS_LOCKED | XKB_STATE_MODS_EFFECTIVE | + XKB_STATE_LEDS)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_EFFECTIVE) == + ((1u << caps) | (1u << shift))); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_DEPRESSED) == + (1u << caps)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_LATCHED) == 0); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_LOCKED) == + (1u << shift)); + + changed = xkb_state_update_mask(state, 0, 0, 0, 0, 0, 0); + assert(changed == (XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LOCKED | + XKB_STATE_MODS_EFFECTIVE | XKB_STATE_LEDS)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_EFFECTIVE) == 0); + + changed = xkb_state_update_mask(state, (1 << alt), 0, 0, 0, 0, 0); + assert(changed == (XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_EFFECTIVE)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_EFFECTIVE) == + ((1u << alt) | (1u << mod1))); + + changed = xkb_state_update_mask(state, 0, 0, (1 << num), 0, 0, 0); + assert(changed == (XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LOCKED | + XKB_STATE_MODS_EFFECTIVE | XKB_STATE_LEDS)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_EFFECTIVE) == + ((1u << num) | (1u << mod2))); + + xkb_state_update_mask(state, 0, 0, 0, 0, 0, 0); + + changed = xkb_state_update_mask(state, (1 << mod2), 0, (1 << num), 0, 0, 0); + assert(changed == (XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LOCKED | + XKB_STATE_MODS_EFFECTIVE | XKB_STATE_LEDS)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_EFFECTIVE) == + ((1u << mod2) | (1u << num))); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_DEPRESSED) == + (1u << mod2)); + assert(xkb_state_serialize_mods(state, XKB_STATE_MODS_LOCKED) == + ((1u << num) | (1u << mod2))); + + xkb_state_unref(state); +} + +static void test_repeat(struct xkb_keymap *keymap) { assert(!xkb_keymap_key_repeats(keymap, KEY_LEFTSHIFT + 8)); @@ -622,6 +691,7 @@ main(void) test_update_key(keymap); test_serialisation(keymap); + test_update_mask_mods(keymap); test_repeat(keymap); test_consume(keymap); test_range(keymap); commit a1f0595a683a167901a2f1d9f02b9b637bd762a6 Author: Ran Benita <ran...@gmail.com> Date: Mon Aug 18 20:27:07 2014 +0300 state: make sure the mods are fully resolved after xkb_state_update_mask() Virtual modifiers can have "mappings" to real modifiers, e.g. NumLock may also set Mod2. In a normal turn of events, the various components (depressed, latched, locked, and consequently effective) include the mapped mods, because the masks are pre-resolved everywhere. However, xkb_state_update_mask() accepts arbitrary mod masks, which may not be resolved (if it comes from somewhere other than xkb_state_serialize_mods()). So let's always resolve them ourselves. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/src/state.c b/src/state.c index 279a646..6613969 100644 --- a/src/state.c +++ b/src/state.c @@ -797,6 +797,27 @@ xkb_state_update_mask(struct xkb_state *state, state->components.latched_mods = latched_mods & mask; state->components.locked_mods = locked_mods & mask; + /* Make sure the mods are fully resolved - since we get arbitrary + * input, they might not be. + * + * It might seem more reasonable to do this only for components.mods + * in xkb_state_update_derived(), rather than for each component + * seperately. That would allow to distinguish between "really" + * depressed mods (would be in MODS_DEPRESSED) and indirectly + * depressed to to a mapping (would only be in MODS_EFFECTIVE). + * However, the traditional behavior of xkb_state_update_key() is that + * if a vmod is depressed, its mappings are depressed with it; so we're + * expected to do the same here. Also, LEDs (usually) look if a real + * mod is locked, not just effective; otherwise it won't be lit. + * + * We OR here because mod_mask_get_effective() drops vmods. */ + state->components.base_mods |= + mod_mask_get_effective(state->keymap, state->components.base_mods); + state->components.latched_mods |= + mod_mask_get_effective(state->keymap, state->components.latched_mods); + state->components.locked_mods |= + mod_mask_get_effective(state->keymap, state->components.locked_mods); + state->components.base_group = base_group; state->components.latched_group = latched_group; state->components.locked_group = locked_group; commit 99184f1614548722e3531e55bb19ac74327c98cb Author: Ran Benita <ran...@gmail.com> Date: Sat Nov 24 13:29:54 2012 +0200 Make the effective mod mask calculation available to other files We will want to use that function in state.c as well. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/src/keymap.h b/src/keymap.h index 613f955..ac688e2 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -461,6 +461,9 @@ XkbWrapGroupIntoRange(int32_t group, enum xkb_range_exceed_type out_of_range_group_action, xkb_layout_index_t out_of_range_group_number); +xkb_mod_mask_t +mod_mask_get_effective(struct xkb_keymap *keymap, xkb_mod_mask_t mods); + struct xkb_keymap_format_ops { bool (*keymap_new_from_names)(struct xkb_keymap *keymap, const struct xkb_rule_names *names); diff --git a/src/state.c b/src/state.c index 03463c8..279a646 100644 --- a/src/state.c +++ b/src/state.c @@ -1072,6 +1072,28 @@ xkb_state_serialize_layout(struct xkb_state *state, } /** + * Gets a modifier mask and returns the resolved effective mask; this + * is needed because some modifiers can also map to other modifiers, e.g. + * the "NumLock" modifier usually also sets the "Mod2" modifier. + */ +xkb_mod_mask_t +mod_mask_get_effective(struct xkb_keymap *keymap, xkb_mod_mask_t mods) +{ + const struct xkb_mod *mod; + xkb_mod_index_t i; + xkb_mod_mask_t mask; + + /* The effective mask is only real mods for now. */ + mask = mods & MOD_REAL_MASK_ALL; + + xkb_mods_enumerate(i, mod, &keymap->mods) + if (mods & (1u << i)) + mask |= mod->mapping; + + return mask; +} + +/** * Returns 1 if the given modifier is active with the specified type(s), 0 if * not, or -1 if the modifier is invalid. */ diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c index cc5bc83..ec93ee4 100644 --- a/src/xkbcomp/keymap.c +++ b/src/xkbcomp/keymap.c @@ -32,15 +32,7 @@ static void ComputeEffectiveMask(struct xkb_keymap *keymap, struct xkb_mods *mods) { - const struct xkb_mod *mod; - xkb_mod_index_t i; - - /* The effective mask is only real mods for now. */ - mods->mask = mods->mods & MOD_REAL_MASK_ALL; - - xkb_mods_enumerate(i, mod, &keymap->mods) - if (mods->mods & (1u << i)) - mods->mask |= mod->mapping; + mods->mask = mod_mask_get_effective(keymap, mods->mods); } static void commit 80ae8e61ffe0677369e9f5f865ffe3ae76541816 Author: Ran Benita <ran...@gmail.com> Date: Mon Aug 18 20:08:25 2014 +0300 state: no need for loop in xkb_state_update_mask() Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/src/state.c b/src/state.c index 94545bc..03463c8 100644 --- a/src/state.c +++ b/src/state.c @@ -786,25 +786,16 @@ xkb_state_update_mask(struct xkb_state *state, xkb_layout_index_t locked_group) { struct state_components prev_components; - xkb_mod_index_t num_mods; - xkb_mod_index_t idx; + xkb_mod_mask_t mask; prev_components = state->components; - state->components.base_mods = 0; - state->components.latched_mods = 0; - state->components.locked_mods = 0; - num_mods = xkb_keymap_num_mods(state->keymap); - - for (idx = 0; idx < num_mods; idx++) { - xkb_mod_mask_t mod = (1u << idx); - if (base_mods & mod) - state->components.base_mods |= mod; - if (latched_mods & mod) - state->components.latched_mods |= mod; - if (locked_mods & mod) - state->components.locked_mods |= mod; - } + /* Only include modifiers which exist in the keymap. */ + mask = (xkb_mod_mask_t) ((1ull << xkb_keymap_num_mods(state->keymap)) - 1u); + + state->components.base_mods = base_mods & mask; + state->components.latched_mods = latched_mods & mask; + state->components.locked_mods = locked_mods & mask; state->components.base_group = base_group; state->components.latched_group = latched_group; commit a95c4e83e41eebce45d43d23b5c179d0f2a263ea Author: Ran Benita <ran...@gmail.com> Date: Mon Aug 18 19:47:10 2014 +0300 test/x11comp: server writes \n to displayfd Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/test/x11comp.c b/test/x11comp.c index a8c27fe..c63c4cc 100644 --- a/test/x11comp.c +++ b/test/x11comp.c @@ -81,12 +81,14 @@ main(void) display[0] = ':'; ret = read(pipefds[0], display + 1, sizeof(display) - 1); assert(ret > 0 && 1 + ret < sizeof(display) - 1); + if (display[ret] == '\n') + display[ret] = '\0'; display[1 + ret] = '\0'; close(pipefds[0]); close(pipefds[1]); conn = xcb_connect(display, NULL); - if (!conn || xcb_connection_has_error(conn)) { + if (xcb_connection_has_error(conn)) { ret = SKIP_TEST; goto err_xvfd; } commit 4df720b464f7623710eed0f3d968e3dc175671da Author: Ran Benita <ran...@gmail.com> Date: Sat Aug 9 22:14:34 2014 +0300 test/x11-keyseq: new test It is like test/stringcomp, only instead of using xkb_keymap_new_from_string(), it uses xkbcomp to upload the keymap to a dummy Xvfb X server and then xkb_x11_keymap_new_from_device(). If any of these components are not present or fails, the test is shown as skipped. The test is messy, fragile, limited and depends on external tools, but I will improve on that later -- it's better to have a test. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/Makefile.am b/Makefile.am index de13dec..f050d56 100644 --- a/Makefile.am +++ b/Makefile.am @@ -211,7 +211,8 @@ endif BUILD_LINUX_TESTS if ENABLE_X11 TESTS += \ - test/x11 + test/x11 \ + test/x11comp check_PROGRAMS += \ test/interactive-x11 @@ -220,6 +221,8 @@ TESTS_X11_CFLAGS = $(XCB_XKB_CFLAGS) test_x11_LDADD = $(TESTS_X11_LDADD) test_x11_CFLAGS = $(TESTS_X11_CFLAGS) +test_x11comp_LDADD = $(TESTS_X11_LDADD) +test_x11comp_CFLAGS = $(TESTS_X11_CFLAGS) test_interactive_x11_LDADD = $(TESTS_X11_LDADD) test_interactive_x11_CFLAGS = $(TESTS_X11_CFLAGS) endif ENABLE_X11 diff --git a/test/.gitignore b/test/.gitignore index d04eec3..0c2354a 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -18,3 +18,4 @@ atom x11 interactive-x11 utf8 +x11comp diff --git a/test/data/keymaps/host.xkb b/test/data/keymaps/host.xkb new file mode 100644 index 0000000..2c0f589 --- /dev/null +++ b/test/data/keymaps/host.xkb @@ -0,0 +1,1683 @@ +xkb_keymap { +xkb_keycodes "evdev_aliases(qwerty)" { + minimum = 8; + maximum = 255; + <ESC> = 9; + <AE01> = 10; + <AE02> = 11; + <AE03> = 12; + <AE04> = 13; + <AE05> = 14; + <AE06> = 15; + <AE07> = 16; + <AE08> = 17; + <AE09> = 18; + <AE10> = 19; + <AE11> = 20; + <AE12> = 21; + <BKSP> = 22; + <TAB> = 23; + <AD01> = 24; + <AD02> = 25; + <AD03> = 26; + <AD04> = 27; + <AD05> = 28; + <AD06> = 29; + <AD07> = 30; + <AD08> = 31; + <AD09> = 32; + <AD10> = 33; + <AD11> = 34; + <AD12> = 35; + <RTRN> = 36; + <LCTL> = 37; + <AC01> = 38; + <AC02> = 39; + <AC03> = 40; + <AC04> = 41; + <AC05> = 42; + <AC06> = 43; + <AC07> = 44; + <AC08> = 45; + <AC09> = 46; + <AC10> = 47; + <AC11> = 48; + <TLDE> = 49; + <LFSH> = 50; + <BKSL> = 51; + <AB01> = 52; + <AB02> = 53; + <AB03> = 54; + <AB04> = 55; + <AB05> = 56; + <AB06> = 57; + <AB07> = 58; + <AB08> = 59; + <AB09> = 60; + <AB10> = 61; + <RTSH> = 62; + <KPMU> = 63; + <LALT> = 64; + <SPCE> = 65; + <CAPS> = 66; + <FK01> = 67; + <FK02> = 68; + <FK03> = 69; + <FK04> = 70; + <FK05> = 71; + <FK06> = 72; + <FK07> = 73; + <FK08> = 74; + <FK09> = 75; + <FK10> = 76; + <NMLK> = 77; + <SCLK> = 78; + <KP7> = 79; + <KP8> = 80; + <KP9> = 81; + <KPSU> = 82; + <KP4> = 83; + <KP5> = 84; + <KP6> = 85; + <KPAD> = 86; + <KP1> = 87; + <KP2> = 88; + <KP3> = 89; + <KP0> = 90; + <KPDL> = 91; + <LVL3> = 92; + <LSGT> = 94; + <FK11> = 95; + <FK12> = 96; + <AB11> = 97; + <KATA> = 98; + <HIRA> = 99; + <HENK> = 100; + <HKTG> = 101; + <MUHE> = 102; + <JPCM> = 103; + <KPEN> = 104; + <RCTL> = 105; + <KPDV> = 106; + <PRSC> = 107; + <RALT> = 108; + <LNFD> = 109; + <HOME> = 110; + <UP> = 111; + <PGUP> = 112; + <LEFT> = 113; + <RGHT> = 114; + <END> = 115; + <DOWN> = 116; + <PGDN> = 117; + <INS> = 118; + <DELE> = 119; + <I120> = 120; + <MUTE> = 121; + <VOL-> = 122; + <VOL+> = 123; + <POWR> = 124; + <KPEQ> = 125; + <I126> = 126; + <PAUS> = 127; + <I128> = 128; + <I129> = 129; + <HNGL> = 130; + <HJCV> = 131; + <AE13> = 132; + <LWIN> = 133; + <RWIN> = 134; + <COMP> = 135; + <STOP> = 136; + <AGAI> = 137; + <PROP> = 138; + <UNDO> = 139; + <FRNT> = 140; + <COPY> = 141; + <OPEN> = 142; + <PAST> = 143; + <FIND> = 144; + <CUT> = 145; + <HELP> = 146; + <I147> = 147; + <I148> = 148; + <I149> = 149; + <I150> = 150; + <I151> = 151; + <I152> = 152; + <I153> = 153; + <I154> = 154; + <I155> = 155; + <I156> = 156; + <I157> = 157; + <I158> = 158; + <I159> = 159; + <I160> = 160; + <I161> = 161; + <I162> = 162; + <I163> = 163; + <I164> = 164; + <I165> = 165; + <I166> = 166; + <I167> = 167; + <I168> = 168; + <I169> = 169; + <I170> = 170; + <I171> = 171; + <I172> = 172; + <I173> = 173; + <I174> = 174; + <I175> = 175; + <I176> = 176; + <I177> = 177; + <I178> = 178; + <I179> = 179; + <I180> = 180; + <I181> = 181; + <I182> = 182; + <I183> = 183; + <I184> = 184; + <I185> = 185; + <I186> = 186; + <I187> = 187; + <I188> = 188; + <I189> = 189; + <I190> = 190; + <FK13> = 191; + <FK14> = 192; + <FK15> = 193; + <FK16> = 194; + <FK17> = 195; + <FK18> = 196; + <FK19> = 197; + <FK20> = 198; + <FK21> = 199; + <FK22> = 200; + <FK23> = 201; + <FK24> = 202; + <MDSW> = 203; + <ALT> = 204; + <META> = 205; + <SUPR> = 206; + <HYPR> = 207; + <I208> = 208; + <I209> = 209; + <I210> = 210; + <I211> = 211; + <I212> = 212; + <I213> = 213; + <I214> = 214; + <I215> = 215; + <I216> = 216; + <I217> = 217; + <I218> = 218; + <I219> = 219; + <I220> = 220; + <I221> = 221; + <I222> = 222; + <I223> = 223; + <I224> = 224; + <I225> = 225; + <I226> = 226; + <I227> = 227; + <I228> = 228; + <I229> = 229; + <I230> = 230; + <I231> = 231; + <I232> = 232; + <I233> = 233; + <I234> = 234; + <I235> = 235; + <I236> = 236; + <I237> = 237; + <I238> = 238; + <I239> = 239; + <I240> = 240; + <I241> = 241; + <I242> = 242; + <I243> = 243; + <I244> = 244; + <I245> = 245; + <I246> = 246; + <I247> = 247; + <I248> = 248; + <I249> = 249; + <I250> = 250; + <I251> = 251; + <I252> = 252; + <I253> = 253; + indicator 1 = "Caps Lock"; + indicator 2 = "Num Lock"; + indicator 3 = "Scroll Lock"; + indicator 4 = "Compose"; + indicator 5 = "Kana"; + indicator 6 = "Sleep"; + indicator 7 = "Suspend"; + indicator 8 = "Mute"; + indicator 9 = "Misc"; + indicator 10 = "Mail"; + indicator 11 = "Charging"; + indicator 12 = "Shift Lock"; + indicator 13 = "Group 2"; + indicator 14 = "Mouse Keys"; + alias <AC12> = <BKSL>; + alias <MENU> = <COMP>; + alias <HZTG> = <TLDE>; + alias <LMTA> = <LWIN>; + alias <RMTA> = <RWIN>; + alias <ALGR> = <RALT>; + alias <KPPT> = <I129>; + alias <LatQ> = <AD01>; + alias <LatW> = <AD02>; + alias <LatE> = <AD03>; + alias <LatR> = <AD04>; + alias <LatT> = <AD05>; + alias <LatY> = <AD06>; + alias <LatU> = <AD07>; + alias <LatI> = <AD08>; + alias <LatO> = <AD09>; + alias <LatP> = <AD10>; + alias <LatA> = <AC01>; + alias <LatS> = <AC02>; + alias <LatD> = <AC03>; + alias <LatF> = <AC04>; + alias <LatG> = <AC05>; + alias <LatH> = <AC06>; + alias <LatJ> = <AC07>; + alias <LatK> = <AC08>; + alias <LatL> = <AC09>; + alias <LatZ> = <AB01>; + alias <LatX> = <AB02>; + alias <LatC> = <AB03>; + alias <LatV> = <AB04>; + alias <LatB> = <AB05>; + alias <LatN> = <AB06>; + alias <LatM> = <AB07>; +}; + +xkb_types "complete" { + virtual_modifiers NumLock,Alt,LevelThree,LAlt,RAlt,RControl,LControl,ScrollLock,LevelFive,AltGr,Meta,Super,Hyper; + + type "ONE_LEVEL" { + modifiers= none; + level_name[Level1]= "Any"; + }; + type "TWO_LEVEL" { + modifiers= Shift; + map[Shift]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + }; + type "ALPHABETIC" { + modifiers= Shift+Lock; + map[Shift]= Level2; + map[Lock]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Caps"; + }; + type "KEYPAD" { + modifiers= Shift+NumLock; + map[Shift]= Level2; + map[NumLock]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Number"; + }; + type "SHIFT+ALT" { + modifiers= Shift+Alt; + map[Shift+Alt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift+Alt"; + }; + type "PC_CONTROL_LEVEL2" { + modifiers= Control; + map[Control]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Control"; + }; + type "PC_LCONTROL_LEVEL2" { + modifiers= LControl; + map[LControl]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "LControl"; + }; + type "PC_RCONTROL_LEVEL2" { + modifiers= RControl; + map[RControl]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "RControl"; + }; + type "PC_ALT_LEVEL2" { + modifiers= Alt; + map[Alt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Alt"; + }; + type "PC_LALT_LEVEL2" { + modifiers= LAlt; + map[LAlt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "LAlt"; + }; + type "PC_RALT_LEVEL2" { + modifiers= RAlt; + map[RAlt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "RAlt"; + }; + type "CTRL+ALT" { + modifiers= Shift+Control+Alt+LevelThree; + map[Shift]= Level2; + preserve[Shift]= Shift; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + preserve[Shift+LevelThree]= Shift; + map[Control+Alt]= Level5; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "Ctrl+Alt"; + }; + type "LOCAL_EIGHT_LEVEL" { + modifiers= Shift+Lock+Control+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+Lock+LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Control]= Level5; + map[Shift+Lock+Control]= Level5; + map[Shift+Control]= Level6; + map[Lock+Control]= Level6; + map[Control+LevelThree]= Level7; + map[Shift+Lock+Control+LevelThree]= Level7; + map[Shift+Control+LevelThree]= Level8; + map[Lock+Control+LevelThree]= Level8; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Level3"; + level_name[Level4]= "Shift Level3"; + level_name[Level5]= "Ctrl"; + level_name[Level6]= "Shift Ctrl"; + level_name[Level7]= "Level3 Ctrl"; + level_name[Level8]= "Shift Level3 Ctrl"; + }; + type "THREE_LEVEL" { + modifiers= Shift+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Level3"; + }; + type "EIGHT_LEVEL" { + modifiers= Shift+LevelThree+LevelFive; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "EIGHT_LEVEL_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree+LevelFive; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Shift+Lock+LevelThree]= Level3; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[Lock+LevelFive]= Level6; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[Lock+LevelThree+LevelFive]= Level8; + map[Shift+Lock+LevelThree+LevelFive]= Level7; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "EIGHT_LEVEL_SEMIALPHABETIC" { + modifiers= Shift+Lock+LevelThree+LevelFive; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level4; + preserve[Shift+Lock+LevelThree]= Lock; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[Lock+LevelFive]= Level6; + preserve[Lock+LevelFive]= Lock; + map[Shift+Lock+LevelFive]= Level6; + preserve[Shift+Lock+LevelFive]= Lock; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[Lock+LevelThree+LevelFive]= Level7; + preserve[Lock+LevelThree+LevelFive]= Lock; + map[Shift+Lock+LevelThree+LevelFive]= Level8; + preserve[Shift+Lock+LevelThree+LevelFive]= Lock; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "FOUR_LEVEL" { + modifiers= Shift+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + }; + type "FOUR_LEVEL_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Shift+Lock+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + }; + type "FOUR_LEVEL_SEMIALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level4; + preserve[Shift+Lock+LevelThree]= Lock; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + }; + type "FOUR_LEVEL_MIXED_KEYPAD" { + modifiers= Shift+NumLock+LevelThree; + map[NumLock]= Level2; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[NumLock+LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Shift+NumLock+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Number"; -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1xpi9f-0004fb...@moszumanska.debian.org