Skip to content

A small tool to disable the internal keyboard of a Linux laptop when using another external keyboard

Notifications You must be signed in to change notification settings

yingmanwumen/no-internal-kbd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

No Internal Keyboard

Disable the internal keyboard of laptop automatically when using external keyboard(s).

Writting it in Rust just for fun. A shell script is equivalent.

Run it in a systemd service to enable it automatically.

This tool is only for Linux laptop, and it is really simple so I'm not interested in accomplishing it as it already works.

Dependencies

  • libevdev-dev
  • libudev-dev

Theory

Use udev to

  1. collect the information of input devices in /dev/input/eventX
  2. monitor the udev events, or to say the events of inserting and removing a device

Invoke ioctl with signal EVIOCGRAB to disable the internal keyboard. And use evdev to achieve that for convenience(I don't want to write unsafe code).

About

A small tool to disable the internal keyboard of a Linux laptop when using another external keyboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages