caps2esc:logo4alt

Interception tools plugin that maps caps->{esc,ctrl} and logo<->alt
git clone git://git.deurzen.net/caps2esc:logo4alt
Log | Files | Refs | README | LICENSE

commit bb09cd8d9a3f04463df55cb4ba63d2d4920e04a9
parent 0d88388a9e0b37f936447e04404b0718ffa4e81c
Author: Francisco Lopes <francisco@oblita.com>
Date:   Mon,  4 Dec 2017 02:54:52 -0200

Discard MSC_SCAN events

Given that only EV_KEY events are being mapped, without their scancode
counterparts, we just drop all scancode events to avoid having to map
them too, to syncing it with the corresponding mapped keys. This is
expected to be harmless.

Diffstat:
Mcaps2esc.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/caps2esc.c b/caps2esc.c @@ -39,6 +39,9 @@ int main(void) { setbuf(stdin, NULL), setbuf(stdout, NULL); while (read_event(&input)) { + if (input.type == EV_MSC && input.code == MSC_SCAN) + continue; + if (input.type != EV_KEY) { write_event(&input); continue;