From 535cda761c846195e0e0f36bed6ad5e77587e794 Mon Sep 17 00:00:00 2001 From: Julian T Date: Mon, 14 Mar 2022 18:50:46 +0100 Subject: More keymapping and x230 things --- intcp-mapper.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'intcp-mapper.nix') diff --git a/intcp-mapper.nix b/intcp-mapper.nix index 5863f85..95f0a6a 100644 --- a/intcp-mapper.nix +++ b/intcp-mapper.nix @@ -20,11 +20,13 @@ int main(void) { */ if (event.type == EV_KEY) { + switch (event.code) { ${ lib.concatStrings (map (m: '' - if (event.code == ${m.from}) { + case ${m.from}: event.code = ${m.to}; - } + break; '') mappings) } + } } fwrite(&event, sizeof(event), 1, stdout); -- cgit v1.2.3