diff options
| author | 2025-09-01 23:07:14 -0700 | |
|---|---|---|
| committer | 2025-09-01 23:07:14 -0700 | |
| commit | ca9004e5fab51f1d0a8deb7240f4136ecf76ba8a (patch) | |
| tree | ec2d537894e47792741abf47b379a641814716d2 | |
| parent | 482112bef437de50a80f2c7f8bf467e771a220a5 (diff) | |
| download | xkbcat-ca9004e5fab51f1d0a8deb7240f4136ecf76ba8a.tar.gz xkbcat-ca9004e5fab51f1d0a8deb7240f4136ecf76ba8a.zip | |
Skip any normal letter keys
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.
| -rw-r--r-- | xkbcat.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -3,6 +3,9 @@ #include <X11/XKBlib.h> #include <X11/extensions/XInput2.h> +#define XK_LATIN1 +#include <X11/keysymdef.h> + #include <stdbool.h> #include <stdio.h> #include <stdlib.h> @@ -145,6 +148,11 @@ int main(int argc, char *argv[]) { continue; } } + + if ((s >= XK_A && s <= XK_Z) || (s >= XK_a && s <= XK_z)) { + continue; + } + char *str = XKeysymToString(s); if (NULL == str) continue; |
