summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Add guix manifestHEADmasterGravatar Tom Willemse2025-09-021-0/+6
| | | | | This can be used with ‘guix shell --manifest=manifest.scm’ to get a ready-to-go build environment with all required dependencies.
* makefile: Set ‘gcc’ as the C CompilerGravatar Tom Willemse2025-09-021-0/+2
|
* Always clean up event dataGravatar Tom Willemse2025-09-011-4/+6
| | | | | Finally, a use case for ‘goto’ that I think solves the issue pretty nicely. Not so evil after all, perhaps.
* Skip any normal letter keysGravatar Tom Willemse2025-09-011-0/+8
| | | | | | | | 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.
* ReformatGravatar Tom Willemse2025-09-011-132/+139
|
* Update build status badge URLGravatar Antti Korpimäki2023-01-291-1/+1
| | | | just a shields api change: https://github.com/badges/shields/issues/8671
* Use group 0 if current group contains no keysymGravatar Antti Korpimäki2021-12-131-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Support switching keyboard layoutsGravatar Antti Korpimäki2021-12-071-11/+47
| | | | | | | | | | | | | | 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.
* Readme: Minor wording clarificationsGravatar Antti Korpimäki2021-10-011-7/+7
|
* Error when -display option is given without valueGravatar Antti Korpimäki2021-10-011-1/+10
| | | | | | | | 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.
* Readme: Warn that error messages not part of APIGravatar Antti Korpimäki2021-10-011-0/+4
| | | | In case this wasn't clear.
* Quote user-supplied portion in display open errorGravatar Antti Korpimäki2021-10-011-1/+1
| | | | Clearer.
* Tidy: Better comments, scope tempvars, better errsGravatar Antti Korpimäki2021-06-251-29/+32
| | | | Maintenance. No functionality changes.
* Merge branch 'build-with-gh-actions'Gravatar Antti Korpimäki2021-06-253-14/+27
|\ | | | | | | | | Since Travis won't run the build anymore (unless I register for the new .com one that is annoying for OSdev), going for Github Actions instead.
| * Readme: Swap build badge backend for GH ActionsGravatar Antti Korpimäki2021-06-251-1/+1
| |
| * CI: Forgot this keyword, let's try againGravatar Antti Korpimäki2021-06-251-0/+1
| |
| * CI: Swap Travis for GH ActionsGravatar Antti Korpimäki2021-06-252-13/+25
|/ | | | | I think this is the right way to express this, let's see what Github's build server thinks.
* Merge branch 'travis-update' (Focal + gcc fix)Gravatar Antti Korpi2020-12-132-2/+3
|\ | | | | | | Fixes #4.
| * Move linker flags to the endGravatar Antti Korpi2020-12-131-1/+1
| | | | | | | | | | | | | | | | Re #4. Apparently this matters; https://stackoverflow.com/a/409470. The previous order (source file last) has worked for me locally on gcc and clang on Void Linux the whole time, and it works in clang on Travis too. Either way, Travis GCC will catch regressions.
| * Travis: Also test with gccGravatar Antti Korpi2020-12-131-0/+1
| | | | | | | | | | | | | | In addition to clang that is; re issue #4. Ubuntu Focal only has gcc 9.3.0 like my local machine, so I'm expecting this to pass too but at least it's a second opinion.
| * Travis: Test on Ubuntu Focal (20.04)Gravatar Antti Korpi2020-12-131-1/+1
| | | | | | | | | | Should have newer versions of stuff. Perhaps including GCC, to repro https://github.com/anko/xkbcat/issues/4.
* | Readme: Base build badge on master branch statusGravatar Antti Korpi2020-12-131-1/+1
|/ | | | | Inaccurate for it to go red when some speculative feature branch or PR fails.
* Readme: Recommend stty for disabling terminal echoGravatar Antti Korpi2020-10-301-0/+3
| | | | Closes #3.
* Readme: Not quite "<100" lines anymore, but relaxGravatar Antti Korpi2020-03-221-1/+1
|
* Only fflush on loop iterations that printGravatar Antti Korpi2020-03-221-1/+1
| | | | Saves cycles.
* Select for XI_RawKeyRelease at mask, not mainloopGravatar Antti Korpi2020-03-221-2/+2
| | | | Saves cycles.
* Tidy main loop formattingGravatar Antti Korpi2020-03-221-6/+5
|
* Query for specific XInput2 versionGravatar Antti Korpi2020-03-221-4/+14
| | | | | | | | | | | | This is necessary to guarantee the same API in case future versions of XInput decide to break backward compatibility in their defaults. Quoting `man 3 xiqueryversion`: > Clients are required to use XIQueryVersion instead of > XGetExtensionVersion if they use XI2 calls. The server may treat a > client differently depending on the supported version announced by the > client.
* Refactor: Avoid underscores in non-const var namesGravatar Antti Korpi2020-03-221-3/+3
|
* Readme: Correct example output whitespaceGravatar Antti Korpi2020-03-221-6/+6
|
* Readme: Add badge to show off code sizeGravatar Antti Korpi2020-03-221-1/+1
|
* Readme: Add ideas for logging other X11 eventsGravatar Antti Korpi2020-02-121-4/+15
| | | | Ref issue #2.
* Merge branch 'travis-not-again'Gravatar Antti Korpi2020-01-131-0/+2
|\
| * Travis: Just use clangGravatar Antti Korpi2020-01-131-1/+0
| | | | | | | | | | | | | | GCC is failing with "undefined reference" https://travis-ci.org/anko/xkbcat/jobs/636386190 for reasons I cannot comprehend or reproduce anywhere else, but clang is passing like it's supposed to, so I guess that's our life now.
| * Debugging Travis again: Try both clang and gccGravatar Antti Korpi2020-01-131-0/+3
|/ | | | | | I have no idea how the build is failing with the $(CC) change. Flags look the same. Only difference is it's defaulting to gcc. Let's see if this changes anything.
* Readme: Revert to normal Travis badgeGravatar Antti Korpi2020-01-131-1/+1
| | | | The fancy one was unreliable.
* Readme: Text improvements, build badge with dateGravatar Antti Korpi2020-01-131-19/+22
|
* Use $(CC) in makefile, over hardcoding compilerGravatar Antti Korpi2020-01-132-3/+1
| | | | | Who knows what C compiler users like to use. This should cause the right one to be chosen automatically.
* Readme: Add Travis badgeGravatar Antti Korpi2019-11-221-1/+1
|
* Travis: Add build specGravatar Antti Korpi2019-11-221-0/+10
|
* Cleanup: Minor formatting fix in history docGravatar Antti Korpi2019-11-221-1/+1
|
* Readme: minor typos and language improvementsGravatar Antti Korpi2018-01-281-3/+2
|
* Readme: Note libXi dependencyGravatar Antti Korpi2018-01-281-0/+3
|
* Make `make clean` actually clean somethingGravatar Antti Korpi2018-01-281-1/+1
| | | | Whoops.
* Use rm --force at cleanupGravatar Antti Korpi2017-06-261-1/+1
| | | | | Avoids errors when nothing is there to be cleaned up: that's a successful cleanup too.
* Remove .PHONY make targetGravatar Antti Korpi2017-06-261-3/+0
| | | | | I think this is a remnant from some time ago when output executable wasn't called "xkbcat", but it is now, so the .PHONY is unnecessary.
* Readme: clarify other recommendations' wordingGravatar Antti Korpi2016-05-161-3/+3
|
* Readme: Link to keysniffer (global logging)Gravatar Antti Korpi2016-05-161-11/+16
|
* Compile to C99 instead of GNU11Gravatar Antti Korpi2016-04-221-1/+1
| | | | Simpler, now that we don't need the time structs anymore.
* Use XInput2 raw master device instead of pollingGravatar Antti Korpi2016-04-223-53/+48
| | | | Neater implementation, better performance.