How to disable Linux laptop keyboard when custom keyboard is plugged in

9 months ago by fhoekstra to c/ergomechkeyboards

Do you also find yourself wanting to use your custom keyboard while travelling with your Linux laptop? Without triggering keypresses through the built-in keyboard underneath of course! I’ll first show you how to disable the built-in laptop keyboard with a bash script. And then automatically disable the laptop keyboard when, and only when, your custom keyboard is plugged in, and enable it again when your custom keyboard is unplugged.

How are you guys, gals and catpeople doing this? Are you using Sway or Hyprland for this? Anyone else using udev already?

Filetternavn 3 points 9 months ago

Personally? I just open up the laptop and disconnect the keyboard header. Of course, this only works if you only ever use a USB keyboard with the laptop, but thought I'd add it as a valid method.

path: 0 21324553, hotness: undefined, score: 3, children: 0
pixelprimer 2 points 9 months ago

Seems like a silly solution but I just use evtest to disable the keyboard. Did a tiny bash script to disable and re-enable the keyboard by just tracking the pid

path: 0 21335333, hotness: undefined, score: 2, children: 0
absGeekNZ 2 points 9 months ago

I used to do this on my touchscreen laptop, key combo to disable and 4 finger swipe to re-enable.

Wrote a small script that used xinput, ran the script as above.

path: 0 21374040, hotness: undefined, score: 2, children: 0
ergomechkeyboards
ergomechkeyboards

@lemmy.world

login for more options
7835
595
27

Ergonomic, split and other weird keyboards

Rules

Keep it ergo

Posts must be of/about keyboards that have a clear delineation between the left and right halves of the keyboard, column stagger, or both. This includes one-handed (one half doesn't exist, what clearer delineation is that!?)

i.e. no regular non-split¹ row-stagger and no non-split¹ ortholinear²

¹ split meaning a separation of the halves, whether fixed in place or entirely separate, both are fine.
² ortholinear meaning keys layed out in a grid

No Spam

No excessive posting/"shilling" for commercial purposes. Vendors are permitted to promote their products/services but keep it to a minimum and use the [vendor] flair. Posts that appear to be marketing without being transparent about it will be removed.

No Buy/Sell/Trade

This subreddit is not a marketplace, please post on r/mechmarket or other relevant marketplace.

Some useful links

go to feed...