It's been a constant pain in the proverbial to use this Thinkpad R50e, running Ubuntu 9.04, with and without an external keyboard.
It spends much of its life fixed to a desk with an external USB keyboard, connected via a four port USB hub/speaker combination. In this manner, the [NumLock] key needs to be pressed ( on the external keyboard ) for the numeric keys to be usable.
However, when the hub etc. is unplugged e.g. when the laptop goes on the road, the [NumLock] light stays illuminated, meaning that the numeric keys on the Thinkpad's own keypad become activated, preventing half the keyboard from being used for its proper purpose e.g. the U key becomes a 4, the K key becomes a 2 etc. etc. etc.
The problem is that it's not easy to disable [NumLock] from within the Gnome X11 environment - switching to another virtual terminal using [Ctrl][Alt][F1] etc. sometimes works, but that's not a particularly elegant solution.
There are probably better ways, but a Google search found me NumlockX
which does the job far more elegantly.
I installed it as follows: -
sudo apt-get install numlockx
It has three parameters, easily displayed using the command numlockx -? which are: -
on - turns NumLock on in X ( default )
off - turns NumLock off in X
toggle - toggles the NumLock on and off in X
However, I didn't want to have to open a shell merely to do this, so I wrote a simple script: -
#!/bin/bash
numlockx off
saved as numlock.sh which, having set as executable ( chmod +x ) in my user's home directory, I then created a desktop shortcut ( via a Custom Application Launcher ) to it.
I placed this shortcut on the bottom panel, alongside Firefox, Thunderbird, Open Office, Skype etc. and now have a simple way of toggling the NumLock off.
If I wanted to, I could have amended the script to read: -
#!/bin/bash
numlockx toggle
to that I could change the state on AND off, at the click of a mouse button.
Simple ....
Geeking in technology since 1985, with IBM Development, focused upon Docker and Kubernetes on the IBM Z LinuxONE platform In the words of Dr Cathy Ryan, "If you don't write it down, it never happened". To paraphrase one of my clients, "Every day is a school day". I do, I learn, I share. The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions. Remember, YMMV https://infosec.exchange/@davehay
Subscribe to:
Post Comments (Atom)
Note to self - use kubectl to query images in a pod or deployment
In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...
-
Why oh why do I forget this ? Running this command : - ldapsearch -h ad2012.uk.ibm.com -p 389 -D CN=bpmbind,CN=Users,DC=uk,DC=ibm,DC=com -w...
-
Error "ldap_sasl_interactive_bind_s: Unknown authentication method (-6)" on a LDAPSearch command ...Whilst building my mega Connections / Domino / Portal / Quickr / Sametime / WCM environment recently, I was using the LDAPSearch command tha...
-
Whilst building a new "vanilla" Kubernetes 1.25.4 cluster, I'd started the kubelet service via: - systemctl start kubelet.se...
1 comment:
Try shift+numlock.
Post a Comment