Table of Contents#

For those of you with custom keyboards, the in-built laptop keyboard is and will always be a second class citizen. Even with kmonad, I still vastly prefer my chocofi 36 key (board) - very often sitting it on top of the thinkpad built-in keyboard to do my work. The only issue with this is that you get phantom keypresses occasionally from the board sitting on a key.
The solution? Turning off your laptop’s keyboard.
You can find what the machine’s keyboard is called by running
cat /proc/bus/input/devicesand looking for something like this:
1 │ I: Bus=0011 Vendor=0001 Product=0001 Version=ab83 2 │ N: Name="AT Translated Set 2 keyboard" 3 │ P: Phys=isa0060/serio0/input0 4 │ S: Sysfs=/devices/platform/i8042/serio0/input/input0 5 │ U: Uniq= 6 │ H: Handlers=sysrq kbd leds event0 7 │ B: PROP=0 8 │ B: EV=120013 9 │ B: KEY=402000002 3803078f800d001 feffffdfffefffff fffffffffffffffe10 │ B: MSC=1011 │ B: LED=7You’ll note event 0 is the event which our keyboard operates under.
run
cat /sys/class/input/event0/device/inhibitedand you will see the keyboard is not inhibited (0). All you have to do is inhibit it by echoing “1” into that file. Here are two simple aliases you can run:
alias kboff="sudo echo 1 | sudo tee /sys/class/input/event0/device/inhibited"alias kbon="sudo echo 0 | sudo tee /sys/class/input/event0/device/inhibited"Whenever you want to use your laptop keyboard again, simply run kbon or restart your machine, and you will have access to it again.
I thought about automating this for when I connect to the chocofi, but I figured why not run it manually for the next while and see if I like it. Simple enough solution for a simple problem.
Edit: apparently the use of an external keyboard ontop of the internal laptop board is called “Sonshi-style”
As always, God bless, and until next time.
If you enjoyed this post, consider supporting my work by Buying me a Coffee, Checking out my book, or sending me an email to tell me what you think.