{
  "id": 7794697,
  "title": "How I Built a GNOME Utility to Disable My Laptop Keyboard (and What I Learned About Linux Input Devices)",
  "url": "https://urgent.news/2026/09/16/how-i-built-a-gnome-utility-to-disable-my-laptop-keyboard-and-what-i",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-16T13:13:39.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mikachu/how-i-built-a-gnome-utility-to-disable-my-laptop-keyboard-and-what-i-learned-about-linux-input-log"
  },
  "original_language": "en",
  "account": "Using an external keyboard with a laptop can be problematic as it often leads to accidental typing on the built-in keyboard while your hands are on the external one. This issue can significantly impact productivity. To tackle this, the author created KeyFlip, a GNOME/Linux utility that automatically disables the laptop's built-in keyboard when an external keyboard is connected and re-enables it when disconnected. The idea started as a weekend fix but has grown into a packaged tool with tray controls, hardware detection, and Fedora support.\n\nOn Linux, keyboards are not a single input device but can be multiple evdev or libinput input devices. Disabling one keyboard while keeping another active is possible in theory, but reliable implementation is challenging as device names or ports may change. The challenge lies in correctly distinguishing the built-in keyboard from an external one at all times and detecting connection and disconnection events in real-time. Failing to do so could result in the user having no working keyboard at all, which is unacceptable.\n\nKeyFlip identifies the built-in keyboard by its bus type and physical path since device names vary widely. Instead of relying on device names, it hooks into udev to listen for hotplug events, ensuring near-instant response when a keyboard is plugged in or unplugged with minimal idle overhead. To ensure reliability, KeyFlip incorporates safety fallbacks to prevent users from being locked out of their input. It never disables the built-in keyboard on ambiguous detection and re-enables it immediately upon disconnection. Additionally, it provides a tray control for manual override and defaults to enabling the built-in keyboard if the utility crashes or the daemon isn't running. This design decision guarantees that the tool remains trustworthy during unexpected situations.\n\nInitially, KeyFlip was a simple script that solved the author's problem. To make it accessible to others, it evolved into a properly packaged utility with a GUI/tray presence, documentation, issue tracking, and Fedora packaging. This process taught the author valuable lessons about the practical side of Linux distribution, emphasizing the importance of building reliable tools that function seamlessly behind the scenes. If starting KeyFlip today, the author would prioritize udev-based detection and the fail-open safety model from the beginning, as they proved to be effective solutions.",
  "summary": "If you've ever used an external keyboard with your laptop, you know the problem: you rest a wrist on the trackpad, or the laptop shifts slightly, and suddenly you're typing garbage into the built-in keyboard while your hands are on a completely different one. Multiply that by a few hours a day and it's not just annoying — it's a real productivity drain. That was the problem I set out to solve…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}