cross-posted from: https://feddit.nl/post/49130941

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

no comments (yet)

sorted by: hot top controversial new old
there doesn't seem to be anything here
8 comments in c/linux@lemmy.world view that post
[–] 5 points 10 months ago*

Yup, udev is the right tool for this. I'd just put the script in /usr/local/bin, where it belongs.

  • source
  • [–] 8 points 10 months ago (1 child)

    I have never plugged a keyboard into my Linux laptop, but it does have a function key to turn the keyboard off. So did my last one. I use a windows laptop for work and that keyboard does not turn off when an external keyboard is plugged in FWIW.

  • source
  • hideshow 1 child comment
  • [–] 3 points 10 months ago (2 children)

    I assume one of the reasons to fully disable the internal keyboard is that the external one is sitting on top, so this setup is for when you are short of space? (eg.: lap carrying your laptop, note: don't do that!)

    Tho, someone correct me if this is not the case, this way, ¿you would also lose access to the special hardware key functions of the keyboard (eg.: AURA mode, fan speed, rfkill on ASUS laptops, etc), right?

    Defo this is one of the nice thigns I like udev rules for - taking action when specific hardware is plugged or unplugged, thus making the mechanical task of connecting and configuring hardware lots more ergonomic.

  • source
  • hideshow 2 child comments
  • [–] [S] 2 points 10 months ago (1 child)

    My ASUS laptop special buttons above the normal keyboard are registered as a separate device to the kernel, so this does not impact them. They are far enough out of the way to not get pressed by my ergo split though.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 10 months ago (1 child)

    This post is titled badly. Its worded like a question but its actually a blog post that contains the answer. Weird.

  • source
  • hideshow 1 child comment
  • 3 comments in c/ergomechkeyboards@lemmy.world view that post
    [–] 3 points 10 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.

  • source
  • [–] 2 points 10 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.

  • source
  • [–] 2 points 10 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

  • source