5

I'm not sure this is possible, but I thought why not to ask.

I have a laptop without a numeric block, and use it sometimes with external keyboard. Numlock for the internal keyboard = useless, so I never use it.

No numlock for the external keyboard = I press arrows etc instead of numbers by accident.

So, is there any possibility to enable numlock when the laptop starts with the external keyboard, and no numlock with only the internal?

I guess maybe some trickery with lsusb and numlockx?

  • Looking for exactly the same thing here. This script may be useful; I haven't had the opportunity to test and simplify it yet. – l0b0 Nov 19 '14 at 9:46
  • @l0b0 I've made that script - will now put it on AUR. Here -> github.com/MightyPork/autonumlock – MightyPork Nov 19 '14 at 10:30
  • Under which unix variant? Only under X11 (i.e. in the GUI) or also on the console? – Gilles Nov 19 '14 at 23:20
  • Think it's solved, my script works fine.. only under X, i don't go to console often (mostly only to kill X when it freezes) – MightyPork Nov 19 '14 at 23:38
0

Ok so I've made a script for that:

It's now also available in AUR as autonumlock-git. Basically loop with lsusb, grep and checking if the device ID is there or not.

Output - numlockx on / off.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.