Skip to content

Instantly share code, notes, and snippets.

@Xabierland
Last active May 23, 2024 14:28
Show Gist options
  • Save Xabierland/818da0812bc2c507a2e30e185ae9930f to your computer and use it in GitHub Desktop.
Save Xabierland/818da0812bc2c507a2e30e185ae9930f to your computer and use it in GitHub Desktop.
Deshabilitar tecla en Linux

Deshabilitar tecla en Linux

Instalar evtest

Debian

sudo apt install evtest

RedHat

sudo dnf install evtest

Arch

sudo pacman -S evtest

Correr evtest

Al ejecutar el programa y pulsar una tecla nos mostrara en pantalla el "valor" de la tecla pulsada.

sudo evtest

Ejemplo:

Event: time 1654467466.446422, type 4 (EV_MSC), code 4 (MSC_SCAN), value 2c
Event: time 1654467466.446422, type 1 (EV_KEY), code 44 (KEY_Z), value 1
Event: time 1654467466.446422, -------------- SYN_REPORT ------------

2c es la clave en este ejemplo

Crear el archivo

sudo nano /etc/udev/hwdb.d/remap.hwdb
evdev:atkbd:dmi:*
 KEYBOARD_KEY_$KEY=reserved

Modifica $KEY con el valor de la "clave" de la tecla a deshabilitar.

Aplicar cambios

sudo systemd-hwdb update
sudo udevadm trigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment