.gitignore | 5 .travis.yml | 8 Android.mk | 44 - Makefile.am | 101 +--- NEWS | 66 ++ PACKAGING | 22 README.md | 15 bench/rules.c | 4 configure.ac | 10 doc/.gitignore | 1 doc/Doxyfile.in | 10 doc/compat.md | 2 makekeys.py | 51 -- meson.build | 491 ++++++++++++++++++++ meson_options.txt | 58 ++ scripts/doxygen-wrapper | 8 scripts/makeheader | 40 + scripts/makekeys | 51 ++ scripts/update-keysyms | 6 scripts/update-keywords | 4 src/compose/parser.c | 19 src/darray.h | 3 src/keymap.h | 1 src/keysym-utf.c | 3 src/keysym.c | 4 src/keysym.h | 6 src/ks_tables.h | 798 ++++++++++++++++----------------- src/state.c | 124 ++--- src/x11/keymap.c | 1 src/xkbcomp/ast-build.c | 4 src/xkbcomp/expr.c | 6 src/xkbcomp/keymap-dump.c | 2 src/xkbcomp/parser.y | 6 src/xkbcomp/types.c | 8 test/common.c | 2 test/data/rules/base | 50 +- test/data/rules/evdev | 47 + test/data/symbols/altwin | 27 - test/data/symbols/awesome | 26 + test/data/symbols/ca | 6 test/data/symbols/capslock | 21 test/data/symbols/ch | 9 test/data/symbols/ctrl | 19 test/data/symbols/cz | 78 +++ test/data/symbols/de | 467 ++++++++++++++++--- test/data/symbols/group | 31 + test/data/symbols/il | 2 test/data/symbols/in | 153 ++++++ test/data/symbols/inet | 126 +++-- test/data/symbols/keypad | 53 +- test/data/symbols/latin | 2 test/data/symbols/level5 | 10 test/data/symbols/macintosh_vndr/apple | 2 test/data/symbols/macintosh_vndr/us | 4 test/data/symbols/ru | 326 +++++++++++++ test/data/symbols/us | 260 ++++++++++ test/data/types/level5 | 242 +++++----- test/interactive-evdev.c | 1 test/interactive-wayland.c | 111 ++-- test/interactive-x11.c | 4 test/keyseq.c | 15 test/rmlvo-to-kccgst.c | 4 test/rules-file.c | 4 test/symbols-leak-test.bash | 22 test/x11.c | 16 test/x11comp.c | 16 xkbcommon-uninstalled.pc.in | 8 xkbcommon-x11-uninstalled.pc.in | 10 xkbcommon.map | 6 xkbcommon/xkbcommon-compose.h | 7 xkbcommon/xkbcommon-keysyms.h | 40 - xkbcommon/xkbcommon.h | 20 72 files changed, 3092 insertions(+), 1137 deletions(-)
New commits: commit b82e3b764e60df337ca695e8f8642e7bf42b0cca Author: Ran Benita <ran...@gmail.com> Date: Fri Dec 15 21:41:51 2017 +0200 Bump version to 0.8.0 Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/configure.ac b/configure.ac index 10a4ac8..394caa3 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.7.2], +AC_INIT([libxkbcommon], [0.8.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=libxkbcommon], [libxkbcommon], [http://xkbcommon.org]) AC_CONFIG_SRCDIR([Makefile.am]) diff --git a/meson.build b/meson.build index 000d245..5681e6f 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'libxkbcommon', 'c', - version: '0.7.2', + version: '0.8.0', default_options: [ 'c_std=c99', 'warning_level=2', commit 3db1b9d501a3fd76efa8d080ae38c27c74542c38 Author: Ran Benita <ran...@gmail.com> Date: Fri Dec 15 21:40:30 2017 +0200 Update NEWS Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/NEWS b/NEWS index 15859ae..b95087a 100644 --- a/NEWS +++ b/NEWS @@ -1,16 +1,23 @@ -libxkbcommon 0.8.0 - UNRELEASED +libxkbcommon 0.8.0 - 2017-12-15 +================== -- Add xkb_keysym_to_{upper,lower} to perform case-conversion directly on +- Added xkb_keysym_to_{upper,lower} to perform case-conversion directly on keysyms. This is useful in some odd cases, but working with the Unicode representations should be preferred when possible. - Added Unicode conversion rules for the signifblank and permille keysyms. +- Fixed a bug in the parsing of XKB key type definitions where the number + of levels were determined by the number of level *names*. Keymaps which + omit level names were hence miscompiled. + + This regressed in version 0.4.3. Keymaps from xkeyboard-config were not + affected since they don't omit level names. + - New API: xkb_keysym_to_upper() xkb_keysym_to_lower() -================== libxkbcommon 0.7.2 - 2017-08-04 ================== commit 8ce81c0607da0d821bb79bcac7c7a07d9f863a42 Author: Ran Benita <ran...@gmail.com> Date: Fri Dec 15 16:17:45 2017 +0200 README,PACKAGING: use the new meson unified command format Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/PACKAGING b/PACKAGING index 6737f5e..ab1b682 100644 --- a/PACKAGING +++ b/PACKAGING @@ -6,7 +6,7 @@ The files for libxkbcommon-x11 are: xkbcommon-x11.map xkbcommon-x11.pc libxkbcommon-x11 can be disabled with -Denable-x11=false (see -`mesonconf build` for other options/variables). +`meson configure build` for other options/variables). Dependencies for libxkbcommon: - C compiler, meson, pkg-config, libc, bash, grep, sed. diff --git a/README.md b/README.md index 9aab641..358e7d7 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ See [Quick Guide](doc/quick-guide.md). libxkbcommon is built with [Meson](http://mesonbuild.com/): - meson build + meson setup build ninja -C build To build for use with Wayland, you can disable X11 support while still using the X11 keyboard configuration resource files thusly: - meson build \ + meson setup build \ -Denable-x11=false \ -Dxkb-config-root=/usr/share/X11/xkb \ -Dx-locale-root=/usr/share/X11/locale commit 5c9042127f50b765a0e83944084324d99c77fe95 Author: Ran Benita <ran...@gmail.com> Date: Thu Dec 14 17:12:52 2017 +0200 build: disable -Wdocumentation-deprecated-sync We will never remove the deprecated functions and there is no real reason to annoy users into stop using them. If there *will* be a reason, *then* we will add the attribute. Fixes: https://github.com/xkbcommon/libxkbcommon/issues/56 Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/configure.ac b/configure.ac index 56b0706..10a4ac8 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,7 @@ AM_CONDITIONAL(BUILD_LINUX_TESTS, [test "x$ac_cv_header_linux_input_h" = xyes]) XORG_TESTSET_CFLAG([BASE_CFLAGS], [-fvisibility=hidden]) XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wextra -Wno-unused-parameter -Wno-missing-field-initializers]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdocumentation]) +XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdocumentation -Wno-documentation-deprecated-sync]) # OpenBSD does not have DT_NEEDED entries for libc by design # so when these flags are passed to ld via libtool the checks will fail diff --git a/meson.build b/meson.build index bdd7a83..000d245 100644 --- a/meson.build +++ b/meson.build @@ -30,6 +30,7 @@ foreach cflag: [ '-Wlogical-op', '-Wdate-time', '-Wwrite-strings', + '-Wno-documentation-deprecated-sync', ] if cc.has_argument(cflag) add_project_arguments(cflag, language: 'c') commit 10e1a1b1aac85b438003d0feecfcfaadfac2baf7 Author: Ran Benita <ran...@gmail.com> Date: Tue Dec 12 14:53:25 2017 +0200 travis: ensure all tests are valgrind-clean The tests will fail if they have any memory leaks or perform invalid accesses. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/.travis.yml b/.travis.yml index ee9be59..830125e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: c before_install: - sudo apt-get update -qq - - sudo apt-get -y install xutils-dev doxygen libxcb-xkb-dev python3-pip + - sudo apt-get -y install xutils-dev doxygen libxcb-xkb-dev python3-pip valgrind - wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip && unzip ninja-linux.zip && sudo install ninja /usr/bin/ - sudo pip3 install meson @@ -14,4 +14,4 @@ compiler: script: - mkdir autotools-build && pushd autotools-build && ../autogen.sh && make && make check && popd - - meson meson-build -Denable-wayland=false && pushd meson-build && ninja && ninja test && popd + - meson setup meson-build -Denable-wayland=false && pushd meson-build && ninja && meson test --print-errorlogs --wrap='valgrind --leak-check=full --track-origins=yes --error-exitcode=99' && popd commit 29998c258c805344b5f3fae9a347f39cfc5d5447 Author: Ran Benita <ran...@gmail.com> Date: Tue Dec 12 15:57:58 2017 +0200 test/x11: properly clean up also when skipping test To make valgrind happy. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/test/x11.c b/test/x11.c index 232e136..17e8ad8 100644 --- a/test/x11.c +++ b/test/x11.c @@ -34,6 +34,7 @@ main(void) struct xkb_keymap *keymap; struct xkb_state *state; char *dump; + int exit_code = 0; /* * The next two steps depend on a running X server with XKB support. @@ -41,16 +42,20 @@ main(void) * So we don't want a FAIL here. */ conn = xcb_connect(NULL, NULL); - if (!conn || xcb_connection_has_error(conn)) - return SKIP_TEST; + if (!conn || xcb_connection_has_error(conn)) { + exit_code = SKIP_TEST; + goto err_conn; + } ret = xkb_x11_setup_xkb_extension(conn, XKB_X11_MIN_MAJOR_XKB_VERSION, XKB_X11_MIN_MINOR_XKB_VERSION, XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS, NULL, NULL, NULL, NULL); - if (!ret) - return SKIP_TEST; + if (!ret) { + exit_code = SKIP_TEST; + goto err_conn; + } device_id = xkb_x11_get_core_keyboard_device_id(conn); assert(device_id != -1); @@ -71,8 +76,9 @@ main(void) free(dump); xkb_state_unref(state); xkb_keymap_unref(keymap); +err_conn: xcb_disconnect(conn); xkb_context_unref(ctx); - return 0; + return exit_code; } commit 47f45194e497e1499a4d76d49b44372c5c104a10 Author: Ran Benita <ran...@gmail.com> Date: Tue Dec 12 15:44:52 2017 +0200 compose/parser: be more careful when checking if sequence overrides or duplicates another Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/src/compose/parser.c b/src/compose/parser.c index 2ca1653..40c9470 100644 --- a/src/compose/parser.c +++ b/src/compose/parser.c @@ -316,6 +316,7 @@ struct production { unsigned int len; xkb_keysym_t keysym; char string[256]; + /* At least one of these is true. */ bool has_keysym; bool has_string; @@ -400,9 +401,20 @@ add_production(struct xkb_compose_table *table, struct scanner *s, } if (node->u.leaf.utf8 != 0 || node->u.leaf.keysym != XKB_KEY_NoSymbol) { - if (streq(&darray_item(table->utf8, node->u.leaf.utf8), - production->string) && - node->u.leaf.keysym == production->keysym) { + bool same_string = + (node->u.leaf.utf8 == 0 && !production->has_string) || + ( + node->u.leaf.utf8 != 0 && production->has_string && + streq(&darray_item(table->utf8, node->u.leaf.utf8), + production->string) + ); + bool same_keysym = + (node->u.leaf.keysym == XKB_KEY_NoSymbol && !production->has_keysym) || + ( + node->u.leaf.keysym != XKB_KEY_NoSymbol && production->has_keysym && + node->u.leaf.keysym == production->keysym + ); + if (same_string && same_keysym) { scanner_warn(s, "this compose sequence is a duplicate of another; skipping line"); return; } commit 2963e29f0efbc9414d6f908dcfbf57ee30dc22a9 Author: Ran Benita <ran...@gmail.com> Date: Tue Dec 12 14:43:24 2017 +0200 xkbcomp/ast-build: fix memory leak when appending multi-keysyms `syms` was not freed. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/src/darray.h b/src/darray.h index be0319f..5896d21 100644 --- a/src/darray.h +++ b/src/darray.h @@ -110,6 +110,9 @@ typedef darray (unsigned long) darray_ulong; #define darray_copy(arr_to, arr_from) \ darray_from_items((arr_to), (arr_from).item, (arr_from).size) +#define darray_concat(arr_to, arr_from) \ + darray_append_items((arr_to), (arr_from).item, (arr_from).size) + /*** String buffer ***/ #define darray_append_string(arr, str) do { \ diff --git a/src/xkbcomp/ast-build.c b/src/xkbcomp/ast-build.c index eeef76a..58f97f9 100644 --- a/src/xkbcomp/ast-build.c +++ b/src/xkbcomp/ast-build.c @@ -226,14 +226,12 @@ ExprAppendKeysymList(ExprDef *expr, xkb_keysym_t sym) ExprDef * ExprAppendMultiKeysymList(ExprDef *expr, ExprDef *append) { - xkb_keysym_t *syms; unsigned nSyms = darray_size(expr->keysym_list.syms); unsigned numEntries = darray_size(append->keysym_list.syms); darray_append(expr->keysym_list.symsMapIndex, nSyms); darray_append(expr->keysym_list.symsNumEntries, numEntries); - darray_steal(append->keysym_list.syms, &syms, NULL); - darray_append_items(expr->keysym_list.syms, syms, numEntries); + darray_concat(expr->keysym_list.syms, append->keysym_list.syms); FreeStmt((ParseCommon *) &append); commit 26453b84732da870f5695ee347970b337cfea9c1 Author: Ran Benita <ran...@gmail.com> Date: Tue Dec 12 14:30:21 2017 +0200 keymap: fix NULL dereference when dumping the default fallback type The default fallback type uses type->level_names = NULL but the keymap-dump code was not checking this case. Instead of adding more workarounds and possible bugs (e.g. previous commit), let's just keep the number of level names separately. This has the additional advantage retains extraneous level name if someone adds them for some reason. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/src/keymap.h b/src/keymap.h index 1093e47..c15052b 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -253,6 +253,7 @@ struct xkb_key_type { xkb_atom_t name; struct xkb_mods mods; xkb_level_index_t num_levels; + unsigned int num_level_names; xkb_atom_t *level_names; unsigned int num_entries; struct xkb_key_type_entry *entries; diff --git a/src/xkbcomp/keymap-dump.c b/src/xkbcomp/keymap-dump.c index d05a410..2ed591c 100644 --- a/src/xkbcomp/keymap-dump.c +++ b/src/xkbcomp/keymap-dump.c @@ -228,7 +228,7 @@ write_types(struct xkb_keymap *keymap, struct buf *buf) entry->preserve.mods)); } - for (xkb_level_index_t n = 0; n < type->num_levels; n++) + for (xkb_level_index_t n = 0; n < type->num_level_names; n++) if (type->level_names[n]) write_buf(buf, "\t\tlevel_name[Level%u]= \"%s\";\n", n + 1, xkb_atom_text(keymap->ctx, type->level_names[n])); diff --git a/src/xkbcomp/types.c b/src/xkbcomp/types.c index 4696086..e85b67e 100644 --- a/src/xkbcomp/types.c +++ b/src/xkbcomp/types.c @@ -693,6 +693,7 @@ CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info) type->num_entries = 0; type->name = xkb_atom_intern_literal(keymap->ctx, "default"); type->level_names = NULL; + type->num_level_names = 0; } else { for (unsigned i = 0; i < num_types; i++) { @@ -702,10 +703,8 @@ CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info) type->name = def->name; type->mods.mods = def->mods; type->num_levels = def->num_levels; - darray_steal(def->level_names, - &type->level_names, NULL); - darray_steal(def->entries, - &type->entries, &type->num_entries); + darray_steal(def->level_names, &type->level_names, &type->num_level_names); + darray_steal(def->entries, &type->entries, &type->num_entries); } } commit 9f85d6b78cc05f798a2d335774ee1cedc5b2b784 Author: Ran Benita <ran...@gmail.com> Date: Tue Dec 12 14:02:17 2017 +0200 xkbcomp/types: fix types being assigned the wrong number of levels in some circumstances The buggy code assigned the number of levels based on the number of level names in the definition, instead of the actual number of levels! This would completely break type definitions which do not give names to levels. This was not noticed for so long because xkeyboard-config always gives names to all levels. This regressed in 61fed8dab9b8e27981f36ffc96666d7376546e30. Reported-by: Gatis Paeglis <gatis.paeg...@qt.io> Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/src/xkbcomp/types.c b/src/xkbcomp/types.c index 8d87ad5..4696086 100644 --- a/src/xkbcomp/types.c +++ b/src/xkbcomp/types.c @@ -701,8 +701,9 @@ CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info) type->name = def->name; type->mods.mods = def->mods; + type->num_levels = def->num_levels; darray_steal(def->level_names, - &type->level_names, &type->num_levels); + &type->level_names, NULL); darray_steal(def->entries, &type->entries, &type->num_entries); } commit 18d6aebec003c2de7957f3c94fdc24edf533d084 Author: Ran Benita <ran...@gmail.com> Date: Mon Dec 11 22:41:55 2017 +0200 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 <ran...@gmail.com> diff --git a/NEWS b/NEWS index abe9fd7..15859ae 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,16 @@ +libxkbcommon 0.8.0 - UNRELEASED + +- Add xkb_keysym_to_{upper,lower} to perform case-conversion directly on + keysyms. This is useful in some odd cases, but working with the Unicode + representations should be preferred when possible. + +- Added Unicode conversion rules for the signifblank and permille keysyms. + +- New API: + xkb_keysym_to_upper() + xkb_keysym_to_lower() + +================== libxkbcommon 0.7.2 - 2017-08-04 ================== diff --git a/src/keysym.c b/src/keysym.c index 9e7b4fb..6d06de0 100644 --- a/src/keysym.c +++ b/src/keysym.c @@ -264,7 +264,7 @@ xkb_keysym_is_upper(xkb_keysym_t ks) return (ks == upper ? true : false); } -xkb_keysym_t +XKB_EXPORT xkb_keysym_t xkb_keysym_to_lower(xkb_keysym_t ks) { xkb_keysym_t lower, upper; @@ -274,7 +274,7 @@ xkb_keysym_to_lower(xkb_keysym_t ks) return lower; } -xkb_keysym_t +XKB_EXPORT xkb_keysym_t xkb_keysym_to_upper(xkb_keysym_t ks) { xkb_keysym_t lower, upper; diff --git a/src/keysym.h b/src/keysym.h index ca2bd5e..2633963 100644 --- a/src/keysym.h +++ b/src/keysym.h @@ -62,10 +62,4 @@ xkb_keysym_is_keypad(xkb_keysym_t keysym); bool xkb_keysym_is_modifier(xkb_keysym_t keysym); -xkb_keysym_t -xkb_keysym_to_upper(xkb_keysym_t ks); - -xkb_keysym_t -xkb_keysym_to_lower(xkb_keysym_t ks); - #endif diff --git a/xkbcommon.map b/xkbcommon.map index cc468c6..f28f68f 100644 --- a/xkbcommon.map +++ b/xkbcommon.map @@ -97,3 +97,9 @@ global: xkb_state_key_get_consumed_mods2; xkb_state_mod_index_is_consumed2; } V_0.6.0; + +V_0.8.0 { +global: + xkb_keysym_to_lower; + xkb_keysym_to_upper; +} V_0.7.0; diff --git a/xkbcommon/xkbcommon.h b/xkbcommon/xkbcommon.h index 8b05835..3e7a68d 100644 --- a/xkbcommon/xkbcommon.h +++ b/xkbcommon/xkbcommon.h @@ -493,6 +493,26 @@ xkb_keysym_to_utf8(xkb_keysym_t keysym, char *buffer, size_t size); uint32_t xkb_keysym_to_utf32(xkb_keysym_t keysym); +/** + * Convert a keysym to its uppercase form. + * + * If there is no such form, the keysym is returned unchanged. + * + * The conversion rules may be incomplete; prefer to work with the Unicode + * representation instead, when possible. + */ +xkb_keysym_t +xkb_keysym_to_upper(xkb_keysym_t ks); + +/** + * Convert a keysym to its lowercase form. + * + * The conversion rules may be incomplete; prefer to work with the Unicode + * representation instead, when possible. + */ +xkb_keysym_t +xkb_keysym_to_lower(xkb_keysym_t ks); + /** @} */ /** commit 6456835f1c547e4f9da3dc8728d1fe09eeca8593 Author: Ran Benita <ran...@gmail.com> Date: Sun Dec 3 13:04:35 2017 +0200 test/data: sync with xkeyboard-config 2.22 Some tweaks to the de(neo) keyseq tests were required. It seems to have improved. Signed-off-by: Ran Benita <ran...@gmail.com> diff --git a/test/data/rules/base b/test/data/rules/base index 5f02efa..11e1b56 100644 --- a/test/data/rules/base +++ b/test/data/rules/base @@ -9,12 +9,15 @@ // If you want non-latin layouts implicitly include the en_US layout // uncomment lines below //! $nonlatin = am ara ben bd bg bt by cs deva ge gh gr guj guru il \ -// in ir iku jp kan kh kr la lao lk mk mm mn mv mal ori pk \ -// ru scc sy syr tel th tj tam ua uz +// in ir iku jp kan kh kr la lao lk mk mm mn mv mal olck \ +// ori pk ru scc sy syr tel th tj tam ua uz // PC models ! $pcmodels = pc101 pc102 pc104 pc105 +// Jolla devices and keyboards +! $jollamodels = jollasbj + // Microsoft models (using MS geometry) ! $msmodels = microsoft microsoft4000 microsoft7000 microsoftpro microsoftprousb microsoftprose @@ -122,7 +125,9 @@ sk1300 sk2500 sk6200 sk7100 \ sven sven303 symplon \ toshiba_s3000 trust trustda \ - unitekkb1925 yahoo + unitekkb1925 yahoo \ + teck227 teck229 \ + apex300 ! $inetmediakbds = acer_ferrari4k acer_laptop btc5090 btc9019u cherryblueb \ cherrybluea herrycyboard chicony042 compaqik13 compaqik18 \ @@ -188,6 +193,7 @@ thinkpad = thinkpad(intl) thinkpad60 = thinkpad(60) thinkpadz60 = thinkpad(60) + apex300 = steelseries(apex300) $tmgeometries = typematrix(%m) winbook = winbook(XP5) pc98 = nec(pc98) @@ -347,6 +353,8 @@ classmate us = pc+%l(classmate) empty * = empty(basic) * empty = empty(basic) + jollasbj $nonlatin = jolla_vndr/sbj(common)+us+%l%(v):2 + jollasbj * = jolla_vndr/sbj(common)+%l%(v) $sun $sun_custom = pc+sun_vndr/%l%(v) pc98 nec_vndr/jp = nec_vndr/jp(pc98) macintosh_old us = macintosh_vndr/us(oldmac) @@ -456,6 +464,7 @@ * yu(unicodeyz) = pc+srp(latinunicodeyz) ataritt * = xfree68_vndr/ataritt(us)+%l[1]%(v[1]) amiga * = xfree68_vndr/amiga(usa1)+%l[1]%(v[1]) + jollasbj * = jolla_vndr/sbj(common)+%l[1]%(v[1]) $sun $sun_custom = pc+sun_vndr/%l[1]%(v[1]) macintosh_old us = macintosh_vndr/us(oldmac) macintosh_old $macvendorlayouts = macintosh_vndr/us(oldmac)+macintosh_vndr/%l[1]%(v[1]) @@ -927,6 +936,7 @@ btc5126t = +inet(nav_acpi_common) btc9116u = +inet(btc9019u) btc6301urf = +inet(media_nav_acpi_common) + chromebook = +inet(chromebook) dellsk8125 = +inet(dell) dellsk8135 = +inet(dell) cherrybunlim = +inet(nav_common) @@ -977,26 +987,51 @@ ! layout variant = compat de neo = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) de adnw = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de koy = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone_eszett_home = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwertz = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwerty = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) jp $sun_compat = complete+japan(kana_lock) ! layout[1] variant[1] = compat de neo = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) de adnw = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de koy = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone_eszett_home = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwertz = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwerty = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) jp $sun_compat = complete+japan(kana_lock) ! layout[2] variant[2] = compat de neo = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 de adnw = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de koy = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de bone = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de bone_eszett_home = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de neo_qwertz = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de neo_qwerty = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 jp $sun_compat = +complete+japan(kana_lock):2 ! layout[3] variant[3] = compat de neo = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 de adnw = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de koy = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de bone = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de bone_eszett_home = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de neo_qwertz = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de neo_qwerty = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 jp $sun_compat = +complete+japan(kana_lock):3 ! layout[4] variant[4] = compat de neo = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 de adnw = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de koy = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de bone = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de bone_eszett_home = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de neo_qwertz = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de neo_qwerty = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 jp $sun_compat = +complete+japan(kana_lock):4 ! model layout = compat @@ -1046,13 +1081,16 @@ altwin:left_meta_win = +altwin(left_meta_win) altwin:hyper_win = +altwin(hyper_win) altwin:alt_super_win = +altwin(alt_super_win) + altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin) altwin:swap_alt_win = +altwin(swap_alt_win) + altwin:prtsc_rwin = +altwin(prtsc_rwin) grab:debug = +srvr_ctrl(grab_debug) grp:switch = +group(switch) grp:lswitch = +group(lswitch) grp:win_switch = +group(win_switch) grp:lwin_switch = +group(lwin_switch) grp:rwin_switch = +group(rwin_switch) + grp:menu_switch = +group(menu_switch) grp:toggle = +group(toggle) grp:shifts_toggle = +group(shifts_toggle) grp:ctrls_toggle = +group(ctrls_toggle) @@ -1089,6 +1127,7 @@ grp:ralt_rshift_toggle = +group(ralt_rshift_toggle) grp:alt_shift_toggle = +group(alt_shift_toggle) grp:alt_shift_toggle_bidir = +group(alt_shift_toggle_bidir) + grp:lctrl_lwin_toggle = +group(lctrl_lwin_toggle) lv3:switch = +level3(switch) lv3:ralt_switch = +level3(ralt_switch) lv3:ralt_switch_multikey = +level3(ralt_switch_multikey) @@ -1108,6 +1147,7 @@ caps:backspace = +capslock(backspace) caps:super = +capslock(super) caps:hyper = +capslock(hyper) + caps:menu = +capslock(menu) caps:none = +capslock(none) caps:ctrl_modifier = +capslock(ctrl_modifier) ctrl:nocaps = +ctrl(nocaps) @@ -1164,6 +1204,8 @@ nbsp:level4nl = +nbsp(level4nl) japan:nicola_f_bs = +jp(nicola_f_bs) japan:hztg_escape = +jp(hztg_escape) + korean:ralt_rctrl = +kr(ralt_hangul)+kr(rctrl_hanja) + korean:rctrl_ralt = +kr(rctrl_hangul)+kr(ralt_hanja) kpdl:dot = +kpdl(dot) kpdl:comma = +kpdl(comma) kpdl:dotoss = +kpdl(dotoss) @@ -1203,7 +1245,7 @@ lv5:ralt_switch_lock_cancel = +level5(ralt_switch_lock_cancel) lv5:lwin_switch_lock_cancel = +level5(lwin_switch_lock_cancel) lv5:rwin_switch_lock_cancel = +level5(rwin_switch_lock_cancel) - + parens:swap_brackets = +parens(swap_brackets) ! option = compat diff --git a/test/data/rules/evdev b/test/data/rules/evdev index f58e5b2..872e1de 100644 --- a/test/data/rules/evdev +++ b/test/data/rules/evdev @@ -9,12 +9,15 @@ // If you want non-latin layouts implicitly include the en_US layout // uncomment lines below //! $nonlatin = am ara ben bd bg bt by cs deva ge gh gr guj guru il \ -// in ir iku jp kan kh kr la lao lk mk mm mn mv mal ori pk \ -// ru scc sy syr tel th tj tam ua uz +// in ir iku jp kan kh kr la lao lk mk mm mn mv mal olck \ +// ori pk ru scc sy syr tel th tj tam ua uz // PC models ! $pcmodels = pc101 pc102 pc104 pc105 +// Jolla devices and keyboards +! $jollamodels = jollasbj + // Microsoft models (using MS geometry) ! $msmodels = microsoft microsoft4000 microsoft7000 microsoftpro microsoftprousb microsoftprose @@ -91,6 +94,7 @@ ! model = keycodes pc98 = evdev(pc98) applealu_jis = evdev+macintosh(jisevdev) + $jollamodels = evdev+jolla(jolla) olpc = evdev+olpc(olpc) olpcm = evdev+olpc(olpcm) * = evdev @@ -128,6 +132,7 @@ thinkpad = thinkpad(intl) thinkpad60 = thinkpad(60) thinkpadz60 = thinkpad(60) + apex300 = steelseries(apex300) $tmgeometries = typematrix(%m) winbook = winbook(XP5) pc98 = nec(pc98) @@ -287,6 +292,8 @@ classmate us = pc+%l(classmate) empty * = empty(basic) * empty = empty(basic) + jollasbj $nonlatin = jolla_vndr/sbj(common)+us+%l%(v):2 + jollasbj * = jolla_vndr/sbj(common)+%l%(v) $sun $sun_custom = pc+sun_vndr/%l%(v) pc98 nec_vndr/jp = nec_vndr/jp(pc98) macintosh_old us = macintosh_vndr/us(oldmac) @@ -396,6 +403,7 @@ * yu(unicodeyz) = pc+srp(latinunicodeyz) ataritt * = xfree68_vndr/ataritt(us)+%l[1]%(v[1]) amiga * = xfree68_vndr/amiga(usa1)+%l[1]%(v[1]) + jollasbj * = jolla_vndr/sbj(common)+%l[1]%(v[1]) $sun $sun_custom = pc+sun_vndr/%l[1]%(v[1]) macintosh_old us = macintosh_vndr/us(oldmac) macintosh_old $macvendorlayouts = macintosh_vndr/us(oldmac)+macintosh_vndr/%l[1]%(v[1]) @@ -858,6 +866,7 @@ ! model = symbols $evdevkbds = +inet(evdev)+inet(%m) + chromebook = +inet(evdev)+inet(chromebook) applealu_jis = +inet(evdev)+macintosh_vndr/jp(alujiskeys) * = +inet(evdev) @@ -866,26 +875,51 @@ ! layout variant = compat de neo = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) de adnw = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de koy = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone_eszett_home = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwertz = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwerty = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) jp $sun_compat = complete+japan(kana_lock) ! layout[1] variant[1] = compat de neo = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) de adnw = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de koy = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de bone_eszett_home = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwertz = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de neo_qwerty = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) jp $sun_compat = complete+japan(kana_lock) ! layout[2] variant[2] = compat de neo = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 de adnw = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de koy = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de bone = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de bone_eszett_home = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de neo_qwertz = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de neo_qwerty = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 jp $sun_compat = +complete+japan(kana_lock):2 ! layout[3] variant[3] = compat de neo = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 de adnw = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de koy = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de bone = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de bone_eszett_home = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de neo_qwertz = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de neo_qwerty = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 jp $sun_compat = +complete+japan(kana_lock):3 ! layout[4] variant[4] = compat de neo = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 de adnw = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de koy = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de bone = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de bone_eszett_home = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de neo_qwertz = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de neo_qwerty = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 jp $sun_compat = +complete+japan(kana_lock):4 ! model layout = compat @@ -935,13 +969,16 @@ altwin:left_meta_win = +altwin(left_meta_win) altwin:hyper_win = +altwin(hyper_win) altwin:alt_super_win = +altwin(alt_super_win) + altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin) altwin:swap_alt_win = +altwin(swap_alt_win) + altwin:prtsc_rwin = +altwin(prtsc_rwin) grab:debug = +srvr_ctrl(grab_debug) grp:switch = +group(switch) grp:lswitch = +group(lswitch) grp:win_switch = +group(win_switch) grp:lwin_switch = +group(lwin_switch) grp:rwin_switch = +group(rwin_switch) + grp:menu_switch = +group(menu_switch) grp:toggle = +group(toggle) grp:shifts_toggle = +group(shifts_toggle) grp:ctrls_toggle = +group(ctrls_toggle) @@ -978,6 +1015,7 @@ grp:ralt_rshift_toggle = +group(ralt_rshift_toggle) grp:alt_shift_toggle = +group(alt_shift_toggle) grp:alt_shift_toggle_bidir = +group(alt_shift_toggle_bidir) + grp:lctrl_lwin_toggle = +group(lctrl_lwin_toggle) lv3:switch = +level3(switch) lv3:ralt_switch = +level3(ralt_switch) lv3:ralt_switch_multikey = +level3(ralt_switch_multikey) @@ -997,6 +1035,7 @@ caps:backspace = +capslock(backspace) caps:super = +capslock(super) caps:hyper = +capslock(hyper) + caps:menu = +capslock(menu) caps:none = +capslock(none) caps:ctrl_modifier = +capslock(ctrl_modifier) ctrl:nocaps = +ctrl(nocaps) @@ -1053,6 +1092,8 @@ nbsp:level4nl = +nbsp(level4nl) japan:nicola_f_bs = +jp(nicola_f_bs) japan:hztg_escape = +jp(hztg_escape) + korean:ralt_rctrl = +kr(ralt_hangul)+kr(rctrl_hanja) + korean:rctrl_ralt = +kr(rctrl_hangul)+kr(ralt_hanja) kpdl:dot = +kpdl(dot) kpdl:comma = +kpdl(comma) kpdl:dotoss = +kpdl(dotoss) @@ -1092,7 +1133,7 @@ lv5:ralt_switch_lock_cancel = +level5(ralt_switch_lock_cancel) lv5:lwin_switch_lock_cancel = +level5(lwin_switch_lock_cancel) lv5:rwin_switch_lock_cancel = +level5(rwin_switch_lock_cancel) - + parens:swap_brackets = +parens(swap_brackets) ! option = compat diff --git a/test/data/symbols/altwin b/test/data/symbols/altwin index 76a289a..7240ab8 100644 --- a/test/data/symbols/altwin +++ b/test/data/symbols/altwin @@ -1,4 +1,4 @@ -// Meta is mapped to second level of Alt keys. +// Meta is mapped to second level of Alt. partial modifier_keys xkb_symbols "meta_alt" { key <LALT> { [ Alt_L, Meta_L ] }; @@ -8,7 +8,7 @@ xkb_symbols "meta_alt" { // modifier_map Mod4 {};