Keyboard mapping with keyd
Introduction
High humidity, no air conditioning, and 10–12 hours of daily laptop usage wear down keyboard electronics. Moisture corrodes internal traces, causing short circuits.
When a single key (like Page Down) gets shorted, it triggers constant phantom presses, making the laptop unusable. Because most modern laptops integrate the keyboard into the entire upper body, repair shops make you replace the whole keyboard set and casing for one broken key.
keyd provides a zero-cost software workaround by telling Linux to ignore only the broken key.
Disabling keys with keyd
keyd is an input remapping daemon for Linux. While it supports complex key layering, its device-matching and noop (no-operation) features are sufficient to suppress faulty hardware inputs.
Steps
- Install
keydand enable the service. - Run
sudo keyd monitorand press a key on the keyboard to capture its device id (ex:0001:0001) and the target keycode. - Create
/etc/keyd/default.conf.
[ids]
# hardware id
0001:0001
[main]
# disable shorted key
pagedown = noop
- Reload the config with
sudo keyd reload.