How I Built a GNOME Utility to Disable My Laptop Keyboard (and What I Learned About Linux Input Devices)
Описание и применение
KeyFlip автоматически отключает встроенную клавиатуру ноутбука при подключении внешней, используя события udev и безопасные fallback‑механизмы.
Задача
When using an external keyboard with a laptop, accidental typing on the built‑in keyboard drains productivity and can lock users out of input.
Результат
KeyFlip reliably disables the laptop keyboard when an external keyboard is connected, prevents accidental lockout, and runs with minimal overhead.
Рабочий процесс
- Detect built‑in keyboard via bus type and physical path
- Subscribe to udev hotplug events for real‑time device changes
- On external keyboard connect: disable built‑in keyboard if detection is confident
- On disconnect: immediately re‑enable built‑in keyboard
- Provide tray icon for manual override and status display
Доказательства
KeyFlip identifies the internal keyboard by its bus type and physical path…
The result: near‑instant response when you plug in or unplug a keyboard, with essentially no idle overhead.
- Дата записи: 2026-09-21T07:45:33.479Z