|
238d1324
|
2023-09-29T11:33:28
|
|
Keysyms: Fix missing hpYdiaeresis
The handling of keysym name guards (e.g. `#ifndef XK_Ydiaeresis`) was
incomplete and led to a missing keysym.
Make `sripts/makeheader` more robust to C macros handling.
|
|
49690d93
|
2023-09-28T07:18:56
|
|
Keysyms: Update using latest xorgproto
xorgproto commit: 1c8128d72df22843a2022576850bc5ab5e3a46ea.
|
|
a1770132
|
2023-09-25T11:41:48
|
|
Compose: add iterator API
Allow users to iterate the entries in a compose table. This is useful
for other projects which want programmable access to the sequences,
without having to write their own parser.
- New API:
- `xkb_compose_table_entry_sequence`;
- `xkb_compose_table_entry_keysym`;
- `xkb_compose_table_entry_utf8`;
- `xkb_compose_table_iterator_new`;
- `xkb_compose_table_iterator_free`;
- `xkb_compose_table_iterator_next`.
- Add tests in `test/compose.c`.
- Add benchmark for compose traversal.
- `tools/compose.c`:
- Print entries instead of just validating them.
- Add `--file` option.
- TODO: make this tool part of the xkbcli commands.
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
Co-authored-by: Ran Benita <ran@unusedvar.com>
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
8c7076a0
|
2023-07-04T09:23:23
|
|
Improve the documentation of keysyms in xkbcommon.h
|
|
e811743f
|
2023-07-04T09:23:23
|
|
Add XKB_KEYSYM_MIN and XKB_KEYSYM_MAX
Keysyms are 32-bit integers with the 3 most significant bits always set
to zero. See: Appendix A “KEYSYM Encoding” of the X Window System
Protocol at https://www.x.org/releases/current/doc/xproto/x11protocol.html#keysym_encoding.
Add a new constants XKB_KEYSYM_MIN and XKB_KEYSYM_MAX to make the
interval of valid keysyms more obvious in the code.
|
|
0e9c2ec9
|
2023-04-30T21:30:36
|
|
Improve the doc of the XKB keymap text format, V1 (#321)
- Add table of contents
- Add terminology section
- (WIP) Add Introduction to the format
- Improve the keycode section
- Improve the interpret section
- Add guide to create and use modifiers
- (WIP) Add actions documentation
- Add cross-references
- Add keysyms header to documentation
|
|
003fdee1
|
2023-04-11T22:49:58
|
|
keysyms: add new keysyms XF86EmojiPicker, XF86Dictate
Ref: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/914d8f5e0f469cd0416364dd008e9eea752bf703
Ref: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/a839f0c7fc5596d10e786394d3b0953eb8a1731b
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
5ba075ab
|
2022-12-17T13:51:10
|
|
doc: clarify "server state" and "client state" distinction
Add a common page for the concept and link to there from the relevant
functions.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
b4e81ca1
|
2022-12-16T01:26:25
|
|
context: add XKB_CONTEXT_NO_SECURE_GETENV flag (#312)
This flag is useful for clients that may have relatively benign capabilities
set, like CAP_SYS_NICE, that also want to use the xkb configuration from the
environment and user configs in XDG_CONFIG_HOME.
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/308
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/129
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
a2507c08
|
2022-02-24T10:48:50
|
|
Improve misleading comments #270
|
|
7062ab97
|
2021-05-22T19:36:22
|
|
xkbcommon: deprecate XK_approxeq and XK_notapproxeq
Sync xorg-proto commit
https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/25f3278b85ec7d1c78bb150eaea52f9c98294ea4
Fixes: #82
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
de1b6943
|
2021-04-27T10:10:26
|
|
Move include files to include/ subdirectory
This way we don't specify `include_directorories('.')` which brings in
more than needed.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
5e164ff1
|
2012-07-23T00:41:27
|
|
build: drop the include/ directory
The include/ dir is somewhat redundant and makes it just a bit harder to
handle the -I directives from out side of automake; without it the
default $(top_buildir) just works.
Here's also some further justifications I found:
http://smcv.pseudorandom.co.uk/2008/09/pc-uninstalled/
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
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>
|
|
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>
|
|
8e2c66e9
|
2012-06-22T15:27:05
|
|
Add xkb_key_repeats
Does what it says on the box.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
58b030bb
|
2012-05-20T20:39:35
|
|
Move XKB_KEY_NoSymbol to xkbcommon-keysyms.h
This avoids a couple of special cases in the code, and is more
consistent. Since anyone who includes xkbcommon.h also gets
xkbcommon-keysyms.h, and anyone who include xkbcommon-keysyms.h would
want NoSymbol anyway, there's no down side.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
e0524296
|
2012-06-08T13:10:28
|
|
Add API for getting unicode representation of a keysym
This code uses a table and code derived from
http://www.cl.cam.ac.uk/~mgk25/ucs/keysym2ucs.c
The added API calls are:
xkb_keysym_to_utf32
xkb_keysym_to_utf8
[daniels: Changed API to be more in line with keysym_get_name, added
test, changed formatting to 4-space.]
|
|
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>
|
|
b89b8e70
|
2012-05-13T23:31:59
|
|
Change xkb_map_new_from_fd to use FILE*
i.e. xkb_map_new_from_file. The reason is that flex only works with
FILE's, so we must use fdopen on the file descriptor; but to avoid a
memory leak, we must also fclose() it, which, in turn, closes the file
descriptor itself.
Either way is not acceptable, so we can either:
* dup() the fd and use fdopen on that, or
* have the user call fdopen on his own, and accept a FILE* instead of an
fd.
The second one seems better, and is standard C, so why not. We must add
stdio.h to xkbcommon.h though, which is regrettable, but not a big deal.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
7b00485a
|
2012-05-11T15:03:43
|
|
Rename 'ctx' back to 'context' in external API
Still keep things as 'ctx' internally so we don't have to worry about
typing it too often, but rename the user-visible API back as it was
kinda ugly.
This partially reverts e7bb1e5f.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
471e1122
|
2012-05-09T20:52:33
|
|
Document that xkb_state_get_map doesn't take a ref
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
7a1201bd
|
2012-05-09T20:51:37
|
|
Change xkb_key_get_syms to just return a bare int
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
46441b11
|
2012-05-09T20:49:04
|
|
Move KcCGST API to internal-only
And don't export it. We don't need it for X11 support, let alone
anything else.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
2761b1a3
|
2012-05-09T20:20:12
|
|
Rename serialise to serialize
Yes, British English is correct, but unfortunately we've lost that
battle.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
5a3771d1
|
2012-05-09T20:18:30
|
|
Add common LED names to xkbcommon-names.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
693d0578
|
2012-05-09T20:17:13
|
|
Include xkbcommon-names.h from xkbcommon.h
So clients only have one file to include.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3e3ddd43
|
2012-05-09T20:12:18
|
|
Remove keycode_range_is_legal
It was a pretty pointless check. Also sanitise the _x11 variant to
actually do what it says on the box.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
6433d72e
|
2012-05-09T20:12:12
|
|
Merge remote-tracking branch 'krh/keysyms'
Conflicts:
src/keysym.c
src/misc.c
src/text.h
src/xkbcomp/expr.c
src/xkbcomp/parser.y
src/xkbcomp/parseutils.c
src/xkbcomp/symbols.c
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ace1e5df
|
2012-05-09T09:05:00
|
|
Use our own keysyms
|
|
c6897d26
|
2012-05-09T08:33:04
|
|
Add XKB version of X11 keysyms
With this we're now completely standalone.
add vendor keysyms
|
|
e7bb1e5f
|
2012-05-09T15:03:11
|
|
Shorten context to ctx
(This breaks the API.)
"context" is really annoying to type all the time (and we're going to
type it a lot more :). "ctx" is clear, concise and common in many other
libraries. Use it!
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Fix for xkb -> keymap change.]
|
|
38cb6390
|
2012-05-09T15:15:30
|
|
Change all 'xkb' xkb_keymap names to 'keymap'
To make it a bit more clear what it actually is.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
e1af48bc
|
2012-05-09T13:22:34
|
|
Rename keysym <-> string API
Change them to refer to the string representation of the keysym's name
as a name rather than a string, since we want to add API to get the
Unicode printable representation as well.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
124e62e4
|
2012-05-09T01:06:10
|
|
Add multiple modifier state matching API
Two new calls allow users to test the exact modifier state, including
verifying that no other modifiers but the ones you wanted are down.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
74a197d2
|
2012-05-08T17:59:35
|
|
Add pre-defined names database
xkbcommon-names.h right now just contains a set of hardcoded modifier
strings that are most commonly used for the usual modifiers. Provide
definitions of these so people don't have to worry about typoing a
string or mixing up Mod1 and Mod4.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
2a0f1780
|
2012-05-08T17:52:45
|
|
Add context flag to inhibit default include paths
Which will make the context start with no include paths at all.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
c3584280
|
2012-05-08T17:51:16
|
|
Add flags to context creation
None defined as yet, but why not.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b537b552
|
2012-05-08T17:48:29
|
|
Add flags to keymap compilation entrypoints
No use as yet, but might as well ...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b41c77f8
|
2012-05-07T14:54:12
|
|
Revert "Unconstify xkb_rules_names"
This reverts commit d007cd0a1f3f4b9c927175771ff79aae6fe4ab8b.
This is in fact more restrictive, because it breaks the (common) case
where the strings are const themselved, e.g. "evdev", "us", etc. As is
you must either duplicate the strings or suppress the warnings.
If the user needs to retain the non-const strings, he should instead
just keep them in some other struct and use xkb_rules_names just as
a temporary parameter for xkb_map_new_from_names. Mildly annoying but
acceptable.
|
|
1b9635df
|
2012-04-08T02:08:37
|
|
Add xkb_state_get_map()
This is very useful because it avoids redundent pointers in structs
and/or parameter passing in the application.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
18e6a6a4
|
2012-04-05T10:47:43
|
|
Remove Xfuncproto.h and XKB.h from xkbcommon/xkbcommon.h
The kbproto header is already not needed here anymore.
Move the _X_EXPORT's to the corresponding function definitions, and use
straight extern "C" clauses instead of _XFUNCPROTOBEGIN/END.
It also makes more sense to have the EXPORT's in the source files, as it
provides some documentation to the reader, whereas in the header it's
obvious.
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Updated for xkb_keymap changes.]
|
|
073a2107
|
2012-04-08T15:40:12
|
|
Constify the syms_out argument to xkb_key_get_syms()
The caller should not mess around with these as they come directly from
our internal structs.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
467d7bb6
|
2012-04-05T10:13:24
|
|
Implement missing xkb_state_ref and add return value
xkb_state_ref was missing.
Also modify the _ref functions to return the object instead of being
void. This is a useful idiom:
struct my_object my_object_new(struct xkb_state *state)
{
[...]
my_object->state = xkb_state_ref(state);
[...]
}
Essentially "taking" a reference, such that you don't forget to
increment it and it's one line less (see example in our own code).
A case could also be made for _unref to return the object or NULL, but
this is quite uncommon.
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Updated for xkb_keymap changes.]
|
|
2590b5a1
|
2012-04-08T15:37:36
|
|
Fix compiler warnings
(They were not reported, see next commit).
The reset function declaration didn't match its name in the definition;
the _defaults variant matches better with the rest.
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Updated to current master.]
|
|
d007cd0a
|
2012-04-03T17:08:57
|
|
Unconstify xkb_rules_names
Since we never return an xkb_rules_names and it's all user-provided
strings, seems a bit harsh to have it const.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ef88c7ef
|
2012-04-03T15:14:16
|
|
Rename xkb_desc to xkb_keymap
struct xkb_desc was just a hangover from the old XkbDescRec, which isn't
a very descriptive name.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
69111405
|
2012-04-03T12:48:05
|
|
Properly document xkb_key_get_syms
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
034ffce6
|
2012-03-27T17:22:35
|
|
Use xkb_contexts in keymap compilation
Primarily for the include path, but also for the logging in future.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3e9dd751
|
2012-03-27T16:59:01
|
|
Add new context API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
602e8780
|
2012-03-24T13:27:48
|
|
Define our own NoSymbol value and use it
Since we have our own xkb_keysym_t type, it makes sense to have our own
NoSymbol value instead of the one from X11/X.h.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
d9f934ca
|
2012-03-23T16:52:23
|
|
Mention xkb_state_new can return NULL
in the header comments.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
087327d9
|
2012-03-27T14:41:44
|
|
Move doxygen comment before enum item
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
389c2db1
|
2012-03-27T13:44:48
|
|
Remove internal API from xkbcommon.h
And move it to XKBcomminint.h.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3dcd7ae0
|
2012-03-27T12:20:42
|
|
Remove hardcoded legacy modifier masks
Use the xkb_state_mod_* and xkb_map_mod_* API instead.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
729ac12f
|
2012-03-27T12:19:42
|
|
Remove unused changes structs
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
f89b0a80
|
2012-03-27T12:18:50
|
|
Remove unused members of xkb_state
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ede84734
|
2012-03-27T12:11:45
|
|
Add enum xkb_key_direction instead of bool
Use XKB_KEY_UP instead of 0 and XKB_KEY_DOWN instead of 1.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reported-by: Ran Benita <ran234@gmail.com>
|
|
7f471a70
|
2012-03-27T12:07:57
|
|
Add state serialisation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
d039622a
|
2012-03-22T17:39:12
|
|
Rename keymap allocation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3d672fcf
|
2012-03-22T14:32:53
|
|
Add LED state API
And also convert state.c to use the state API for mods and groups,
rather than testing the state members directly.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
cfb07724
|
2012-03-22T14:30:58
|
|
Fix documentation bugs with mod/group state API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
edcaab65
|
2012-03-21T15:25:32
|
|
Round out new state API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ecea0d71
|
2012-03-21T02:20:07
|
|
Add new state API
Add new API to deal with xkb_state objects, including
xkb_state_update_key, which runs the XKB action machinery internally to
calculate what exactly happens to the state when a given key is pressed
or released.
The canonical way to deal with keys is now:
struct xkb_state *state = xkb_state_new(xkb);
xkb_keysym_t *syms;
int num_syms;
xkb_state_update_key(state, key, is_down);
num_syms = xkb_key_get_syms(state, key, &syms);
More state handling API, including a way to get at or ignore preserved
modifiers, is on its way.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
62444a11
|
2012-03-14T17:06:09
|
|
Convert interp action from xkb_any_action to xkb_action
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
54aa839c
|
2012-03-14T11:59:52
|
|
Remove component listing code
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3ee370e9
|
2012-03-14T11:58:24
|
|
Remove unused control members
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
5dd81733
|
2012-03-14T11:56:59
|
|
Add a tiny bit of documentation to xkbcommon.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
bc074525
|
2012-03-13T19:06:05
|
|
Add xkb_key_get_syms API
(And a slight cosmetic header reformatting.)
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
24c61d0f
|
2012-03-10T14:27:06
|
|
Remove half-implemented radio groups
It looks like this could never have worked anyway, what with num_rg
always being 0 everywhere. Remove it.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
e7c8bac7
|
2012-03-10T14:08:43
|
|
Remove indirect XkbCM* and XkbSM* macros
The XkbKey* macros used to work through XkbCM* and XkbSM* variants, for
the xkb_map and xkb_server_map respectively; the latter versions weren't
used by anyone at all, so just bin them and make the macros work
directly.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
971eb485
|
2012-03-09T20:01:33
|
|
Clean up xkb_keysym_to_string message
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
731e5c40
|
2012-03-09T18:53:47
|
|
Stringify public name types
Ensure that all names under xkb_desc are strings, rather than atoms.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
0bb24c2d
|
2012-03-09T19:03:59
|
|
Introduce xkb_keysym_t type
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
d67a94d3
|
2012-03-09T18:57:14
|
|
Remove atom functions from public API
They're no longer needed since we don't expose any atoms in the
published API anymore. As a result, we don't need to support external
atom implementations either. Result!
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ed5c6c17
|
2012-03-09T16:26:34
|
|
Remove geometry support, again
It still parses geometry, but happily throws it away.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b28823cc
|
2012-03-09T16:04:00
|
|
Remove KcCGST names from the map
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
f57dcfeb
|
2012-02-15T16:23:47
|
|
Raise keycode range to 32 bits
\o/
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ead9d0cb
|
2012-02-15T11:49:10
|
|
Move include path from X11/extensions/ to xkbcommon/
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
4e228511
|
2012-02-15T14:34:08
|
|
Introduce xkb_keycode_t for keycodes
And use it consistently everywhere, including with a special long-safe
internal keycode type, to ease the transition to large keycodes.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|