src/keymap-dump.c


Log

Author Commit Date CI Message
Ran Benita 50b25a12 2012-07-17T11:03:43 Use xkb_group_index_t for group variables throughout Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita d0097f4e 2012-07-15T15:55:34 Pass around xkb_key's instead of keycodes This way we don't need to look up the key every time. We now only deal with keycodes in the public API and in keycodes.c. Also adds an xkb_foreach_key macro, which is used a lot. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ad8875c5 2012-07-15T14:02:36 Remove GroupsWidth macro Use key->width directly instead. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 4ccb0ef5 2012-07-15T13:51:34 Get rid of group_info This is 8 bits which hold how many groups the key has, what to do the key group is out of bound and the group to redirect to if want to. This may save a few bytes, but is really annoying. So instead, just lay out the fields separately. We can optimize later in a sane way, with pahole, bitfields, etc. if we want. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 7d9f0313 2012-07-15T13:00:04 Get rid of struct xkb_key_name Just embed it directly. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita e8a6a5f0 2012-07-15T10:38:05 Add common xkb_key struct Instead of having a million arrays from the keycode to various key-specific info in the keymap, add a single struct xkb_key to hold all of the data for the key in one object. This way we can pass it around, do some refactoring and make the code simpler. It's also nice to see everything in one place. The keys array is still indexed by keycode, which is suboptimal because there may be a lot of holes (i.e. unused keycodes between min_key_code and max_key_code). By the end of this series it would be abstracted enough to replace it by a hash table or similar if there's ever a need. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 81d029f5 2012-07-15T11:52:54 Replace xkb_keycode_t 'key' variable name by 'kc' We want to reserve the name 'key' for something else. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita caca60f3 2012-07-15T01:45:34 Move per_key_repeats and enabled_ctrls to keymap All of the per-key data and global flags are now visible directly in the keymap. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 1313af8f 2012-07-15T01:31:34 Get rid of xkb_key_names Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 50fef8eb 2012-07-15T00:46:31 Get rid of xkb_indicator Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ed082617 2012-07-15T00:39:15 Get rid of xkb_compat_map Same as xkb_{client,server}_map which were already removed. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 3de9d874 2012-07-15T00:26:28 Get rid of xkb_server_map Same as xkb_client_map which was removed before. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 219243fe 2012-07-15T00:06:11 Get rid of xkb_client_map We don't make this distinction anymore, and the separate allocations just make it harder to reason about. Since we require that all of symbols, types, compat etc. be present, we should just put stuff directly in the keymap struct. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 9308a460 2012-07-17T10:20:15 Run source tree through uncrustify .uncrustify.cfg committed for future reference also, but had to manually fix up a few things: it really likes justifying struct initialisers. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 0765064b 2012-07-13T18:34:11 Remove MERGE_ALT_FORM merge mode The mode comes from the "alternate" keyword, which is unused in xkeyboard-config and mostly undocumented. Its purpose is to allow to assign the same key name to multiple key codes, which is not allowed otherwise (and doesn't make much sense). The xkblib specification implies that this was part of the overlay functionality, which we also no longer support. If we do encounter this keyword, we just treat it as MERGE_DEFAULT. The keycodes.c code will detect a collision and will ignore all but the first key code (and the error count is not incremented). Some peripheral code is also removed as a result. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita f0599675 2012-07-11T16:16:20 dump: add back kccgst names Readd the component names to the keymap->names struct. This is used when printing the component, e.g. xkb_keymap { xkb_keycodes "evdev+aliases(qwerty)" { instead of xkb_keymap { xkb_keycodes { This makes diffing against xkbcomp $DISPLAY a bit easier and is kind of useful anyway. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita fe5bfdf9 2012-07-11T16:35:43 dump: a few more tweaks to match xkbcomp output Only uppercase / lowercase stuff. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita fedcf370 2012-07-12T17:54:09 dump: use KeyNameText instead of copying Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 1f492901 2012-07-11T18:00:31 Enlarge keysym name buffers and mention in comment The longest keysym is 27 chars long. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita bc50cdd4 2012-06-05T18:46:24 darray: some changes for convenience - Make darray_free also initialize the array back to an empty state, and stop worrying about it everywhere. - Add darray_mem, to access the underlying memory, which we do manually now using &darray_item(arr, 0). This makes a bit more clear when we actually mean to take the address of a specific item. - Add darray_copy, to make a deep copy of a darray. - Add darray_same, to test whether two darrays have the same underlying memory (e.g. if the struct itself was value copied). This should used where previously two arrays were compared for pointer equality. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita d0718e98 2012-06-05T17:48:08 test/dump: allow to run manually Without the srcdir envvar (and a couple trivial changes). Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone e6ca6fc5 2012-06-04T14:04:04 Fix action= NoAction() printing Print it explicitly, rather than type=0x00, with all the private data too. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone f531d1e1 2012-06-02T15:25:36 keymap-dump: Print NoAction actions too The failure mode here is a little irritating: - server loads map with ISO_Lock action - server dumps keymap to string, including: interpret ISO_Lock+AnyOfOrAll(None) { action= NoAction(); }; as we don't (yet) print ISO_Lock actions - client parses keymap from string - client dumps keymap to string, including: interpret ISO_Lock+AnyOfOrAll(None) { }; - this results in a syntax error Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone ebd397e1 2012-05-25T17:05:39 Add xkb_map_get_as_string Returns a newly-allocated string representing the specified keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>