<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aliens/xkbcat/xkbcat.c, branch master</title>
<subtitle>Personal fork of xkbcat</subtitle>
<id>https://code.ryuslash.org/aliens/xkbcat/atom?h=master</id>
<link rel='self' href='https://code.ryuslash.org/aliens/xkbcat/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/'/>
<updated>2025-09-02T06:36:31Z</updated>
<entry>
<title>Always clean up event data</title>
<updated>2025-09-02T06:36:31Z</updated>
<author>
<name>Tom Willemse</name>
</author>
<published>2025-09-02T06:36:31Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=88372e14c44faddacb3c98b73dc88ce9ea492539'/>
<id>urn:sha1:88372e14c44faddacb3c98b73dc88ce9ea492539</id>
<content type='text'>
Finally, a use case for ‘goto’ that I think solves the issue pretty nicely. Not
so evil after all, perhaps.
</content>
</entry>
<entry>
<title>Skip any normal letter keys</title>
<updated>2025-09-02T06:07:14Z</updated>
<author>
<name>Tom Willemse</name>
</author>
<published>2025-09-02T06:07:14Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=ca9004e5fab51f1d0a8deb7240f4136ecf76ba8a'/>
<id>urn:sha1:ca9004e5fab51f1d0a8deb7240f4136ecf76ba8a</id>
<content type='text'>
I want to know specifically which keys I use the most that _aren't_ just
letters.

I have a keyboard layout that I like just fine, but I want to know which special
keys I actually use the most.
</content>
</entry>
<entry>
<title>Reformat</title>
<updated>2025-09-02T06:00:47Z</updated>
<author>
<name>Tom Willemse</name>
</author>
<published>2025-09-02T06:00:47Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=482112bef437de50a80f2c7f8bf467e771a220a5'/>
<id>urn:sha1:482112bef437de50a80f2c7f8bf467e771a220a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use group 0 if current group contains no keysym</title>
<updated>2021-12-13T12:08:58Z</updated>
<author>
<name>Antti Korpimäki</name>
</author>
<published>2021-12-13T12:08:58Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=0b9c1bce1f71fa870e624055a86e6fb73690dfde'/>
<id>urn:sha1:0b9c1bce1f71fa870e624055a86e6fb73690dfde</id>
<content type='text'>
Fixes #5, perhaps fully this time.

It seems non-zero keysym groups work such that if no keysym is defined
in it, the default 0 group's keysym is assumed.

In other words, common keys that would otherwise just be duplicated in
the group's definition, such as Return, Backspace, Delete, Shift, Space,
or the numpad keys, just have no symbol mapped to them at all in the
group (XkbKeycodeToKeysym returns NoSymbol).  In such cases, it seems
the receiving program is expected to just fall back to group 0 and read
the keysym from there instead.

This is about XKeycodeToKeysym, but XkbKeycodeToKeysym which we're using
(note the different prefix) seems to function the same:
https://stackoverflow.com/questions/54483276/xkeysymtokeycode-and-keyboard-layout

This seems to be correct with the keyboard layouts I've tested.

- - -

Other Xlib users have replaced XKeycodeToKeysym with XGetKeyboardMapping
instead.  These patches to that effect imply XKeycodeToKeysym is
deprecated:

- https://lists.freedesktop.org/archives/piglit/2012-January/001795.html
- https://github.com/ArcticaProject/nx-libs/commit/c79f2d289004d419d8bb76cf8bf731980d40da5d

XkbKeycodeToKeysym is not deprecated though, and seems a much better fit
here than doing heap allocations in a loop, so I'll go with it.
</content>
</entry>
<entry>
<title>Support switching keyboard layouts</title>
<updated>2021-12-07T18:51:21Z</updated>
<author>
<name>Antti Korpimäki</name>
</author>
<published>2021-12-07T18:41:49Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=dc5d4e0919b2f1fd18aee16468a23a6631c26251'/>
<id>urn:sha1:dc5d4e0919b2f1fd18aee16468a23a6631c26251</id>
<content type='text'>
As noted in issue #5, xkbcat would previously not react at all to
keyboard layout changes; it would continue to print keysyms according to
the first keyboard layout X was started with.

Keyboard keysym group changes (i.e. keyboard layout changes) are
listened to as separate events, so if you only use 1 layout, this causes
no performance overhead.

Closes #5.

Thanks to @unxed for very helpful research.
</content>
</entry>
<entry>
<title>Error when -display option is given without value</title>
<updated>2021-10-01T14:39:53Z</updated>
<author>
<name>Antti Korpimäki</name>
</author>
<published>2021-10-01T14:35:16Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=84acdd8f95820d5daea3253a674a1b54c0f1588b'/>
<id>urn:sha1:84acdd8f95820d5daea3253a674a1b54c0f1588b</id>
<content type='text'>
This was always invalid input, but there was no special handling, so if
the `-display` option was given in the last position, the value could be
read 1 entry off the end of the `argv` array.

This catches that, and gives an informative error.
</content>
</entry>
<entry>
<title>Quote user-supplied portion in display open error</title>
<updated>2021-10-01T14:28:20Z</updated>
<author>
<name>Antti Korpimäki</name>
</author>
<published>2021-10-01T14:28:20Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=43aff7d8822195c9e5cd97c5adb71c1bd295856b'/>
<id>urn:sha1:43aff7d8822195c9e5cd97c5adb71c1bd295856b</id>
<content type='text'>
Clearer.
</content>
</entry>
<entry>
<title>Tidy: Better comments, scope tempvars, better errs</title>
<updated>2021-06-25T18:28:54Z</updated>
<author>
<name>Antti Korpimäki</name>
</author>
<published>2021-06-25T18:24:35Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=349c3c4658084cb09cda64e0a604fec75d3d80f2'/>
<id>urn:sha1:349c3c4658084cb09cda64e0a604fec75d3d80f2</id>
<content type='text'>
Maintenance.  No functionality changes.
</content>
</entry>
<entry>
<title>Only fflush on loop iterations that print</title>
<updated>2020-03-22T21:36:45Z</updated>
<author>
<name>Antti Korpi</name>
</author>
<published>2020-03-22T21:36:45Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=723b066423fa9c458c82e23d3daf364767fd77ff'/>
<id>urn:sha1:723b066423fa9c458c82e23d3daf364767fd77ff</id>
<content type='text'>
Saves cycles.
</content>
</entry>
<entry>
<title>Select for XI_RawKeyRelease at mask, not mainloop</title>
<updated>2020-03-22T21:35:00Z</updated>
<author>
<name>Antti Korpi</name>
</author>
<published>2020-03-22T21:35:00Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/xkbcat/commit/?id=f06b95fbf08375f0447b63e8cfa05b55272f0e52'/>
<id>urn:sha1:f06b95fbf08375f0447b63e8cfa05b55272f0e52</id>
<content type='text'>
Saves cycles.
</content>
</entry>
</feed>
