You are not logged in.

#1 2017-12-31 12:09:32

nonZero
Member
Registered: 2015-05-17
Posts: 69

Keep Num-Lock Disabled After Standby

Hi!

I am using gdm+gnome.  I have realized running:

xmodmap -e 'keycode 77 = ISO_Level3_Shift Num_Lock'

Disables the num lock key.

In several situations, when the computer returns from standby or even after switching to a virtual console and returning back, numlock resolves back to it's original functionality.

Adding this to `.xprofile` or `.Xmodmap` have no effect (I guess they are only run once on login).

Any advice?

Thanks!

Offline

#2 2017-12-31 12:51:27

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,056

Re: Keep Num-Lock Disabled After Standby

It doesn't disable the key but makes it a 3rd level shifter (and puts the numlock toggle to the 2nd level)
There's no automagic invocation of either .xprofile nor .Xmodmap, this depends on eg. your session script.

The modmap is likely nuked because the keyboard is re-added on those events (and it also gets lost on any setxkbmap calls) so you'll have to re-run xmodmap.
There seems no xkb rule to handle the numlock key, thus no simple way to do it "right" (you'd have to build your own xkb map)

What's the purpose of this anyway? ("Deactivating" the numlock key this way has usually unforseen side-effects, eg. when clients attempt to test the numlock state)

Offline

Board footer

Powered by FluxBB