From 1570fc3c9d85a69f6fa370877e4c9365a637d813 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 3 Oct 2020 10:53:49 +0100 Subject: update input remap page --- src/SW/xf86-input-evdev/document.en.rest.txt | 21 +++++++++++++++++++++ src/SW/xf86-input-evdev/document.it.rest.txt | 25 ++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/SW/xf86-input-evdev/document.en.rest.txt b/src/SW/xf86-input-evdev/document.en.rest.txt index 04dafaa..4935fed 100644 --- a/src/SW/xf86-input-evdev/document.en.rest.txt +++ b/src/SW/xf86-input-evdev/document.en.rest.txt @@ -6,6 +6,27 @@ :tags: - software - keyboard +.. admonition:: There's a better way! + + These days, the recommended input driver for X11 is + ``xf86-input-libinput``, so I've stopped maintaining this patch. + + Fortunately, there's a much simpler way to get the same result: you + can tell the kernel to remap codes for you, independently for each + keyboard you may have, via the ``udev`` "HW DB". + + In ``/etc/udev/hwdb.d/50-apple-kbd.hwdb`` I have:: + + evdev:input:b0003v05ACp0221* + KEYBOARD_KEY_ff0003=insert # fn -> insert + + (*Important*: the second line starts with exactly 1 space (0x20) + character) + + This `Arch documentation page + `_ + has all the details. + The standard ``xf86-input-evdev`` driver that comes with `xorg` only uses keycodes between 8 and 255, dropping all others. This is fine most of the time (who ever saw a keyboard with more than 247 keys on diff --git a/src/SW/xf86-input-evdev/document.it.rest.txt b/src/SW/xf86-input-evdev/document.it.rest.txt index d8873ea..b6a931e 100644 --- a/src/SW/xf86-input-evdev/document.it.rest.txt +++ b/src/SW/xf86-input-evdev/document.it.rest.txt @@ -6,10 +6,33 @@ :tags: - software - keyboard +.. admonition:: C'è un modo migliore! + + Al momento, il driver di input raccomandato per X11 è + ``xf86-input-libinput``, per cui non sto più mantenendo questa + patch. + + Per fortuna, esiste un metodo molto più semplice per ottenere lo + stesso risultato: si può dire al kernel di rimappare i tasti, + separatamente per ciascuna tastiera, tramite il "HW DB" di + ``udev``. + + In ``/etc/udev/hwdb.d/50-apple-kbd.hwdb`` ho scritto:: + + evdev:input:b0003v05ACp0221* + KEYBOARD_KEY_ff0003=insert # fn -> insert + + (*Attenzione*: la seconda riga deve iniziare con esattamente 1 + carattere "spazio" (0x20)) + + Questa `pagina di documentazione di Arch (in Inglese) + `_ + spiega il tutto in dettaglio. + Il driver ``xf86-input-evdev`` che viene di serie con `xorg` usa soltanto i keycode tra 8 e 255, ignorando tutti gli altri. Questo funziona per la maggior parte dei casi (chi ha mai visto una tastiera -con più di 247 tasti?), ma causa problemi quando i keycode con sono +con più di 247 tasti?), ma causa problemi quando i keycode non sono consecutivi. Ad esempio, la tastiera Apple Alluminio (ID USB ``05ac:0221``) emette -- cgit v1.2.3