LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Hardwire a keyboard - NumLock ALWAYS on? (https://www.linuxquestions.org/questions/linux-hardware-18/hardwire-a-keyboard-numlock-always-on-4175654455/)

taylorkh 05-23-2019 11:34 AM

Hardwire a keyboard - NumLock ALWAYS on?
 
I am asking this out of sheer frustration. I am in the middle of a bunch of application packaging and installation testing. As a result I am building and using a considerable number of virtual machines. It seems that they start with NumLock off. I always leave NumLock on so I never check. When I scp a new package from the host to the VM I start typing scp 10.42.0.20... and about half way through the numbers I see that I have typed a bunch of gibberish as NumLock is off on the VM.

I would love to be able to open my keyboard and solder a couple of wires or something to eliminate the NumLock isue FOREVER. I would also be willing to purchase a keyboard which had had a permanent NumLock setting.

If anyone can offer any suggestions that would be great. At least I had an opportunity to vent my frustration.

TIA,

Ken

hydrurga 05-23-2019 11:49 AM

What is the guest distro in the VMs?

273 05-23-2019 01:01 PM

Subscribing to this thread because I wish to do thi also. I can likely acheive it using the "special software" for my keyboard, which allowed me to turn CpasLock into Shift, but a hardware solution would be great.
Sadly, thinking about how keyboards work, I'm not sure how this would work as I think the "lock" is transmitted then held by software but I hope to be proven wrong.

taylorkh 05-23-2019 01:02 PM

Ubuntu, Ubuntu Mate, CentOS, Linux Mint, Fedora... It does not seem to matter. They seem to come up CapsLock off initially after installing. After changing to CapsLock on it seems to stay that way. My host - CentOS 7 - suffers the same thing on occasion when switching from VM to host (or when I accidentally set it off). Bottom line, I have separate navigation keys on the keyboard and I DO NOT use the navigation keys on the numeric keypad. It is just a continuing annoyance - Like a toothache :(

Thanks,

Ken

hydrurga 05-23-2019 01:38 PM

Quote:

Originally Posted by taylorkh (Post 5998163)
Ubuntu, Ubuntu Mate, CentOS, Linux Mint, Fedora... It does not seem to matter. They seem to come up CapsLock off initially after installing. After changing to CapsLock on it seems to stay that way. My host - CentOS 7 - suffers the same thing on occasion when switching from VM to host (or when I accidentally set it off). Bottom line, I have separate navigation keys on the keyboard and I DO NOT use the navigation keys on the numeric keypad. It is just a continuing annoyance - Like a toothache :(

Thanks,

Ken

Ok, so some sort of distro startup script to turn NumLock on wouldn't be of much use to you since you change it anyway on first run.

By the way, why has NumLock now become CapsLock? Do you have a problem with both keys?

scasey 05-23-2019 02:10 PM

I did find a setting under Accessibility "Use visual indicator on Caps and Num Lock" that causes a popup to display briefly with the state of the Lock when the key is pressed. Also not finding anything to keep the num lock on at boot, although I have seen posts that it may be settable in the BIOS -- I've not checked that yet.

TB0ne 05-23-2019 02:14 PM

Quote:

Originally Posted by hydrurga (Post 5998178)
Ok, so some sort of distro startup script to turn NumLock on wouldn't be of much use to you since you change it anyway on first run.

I agree with this, since most DE's have a setting to enable caps-lock/auto repeat/etc., unless of course you're running in console mode only.

That said, most BIOS have an option to enable numlock at system boot. If you're cloning a VM, wouldn't that be an option as well? Enable it in one, then spin up further images and it'll be there.
Quote:

By the way, why has NumLock now become CapsLock? Do you have a problem with both keys?
Was assuming that was a mistake, but don't know.

taylorkh 05-23-2019 02:51 PM

Thanks hydrurga,

NumLock became CapsLock because of TypoLock :redface: NumLock is the concern.

Thanks scasey,

I found something similar for the notification area. Unless it comes out an punches me in the head I will not pay attention when I am working on something. A number pad is supposed to input NUMBERS :banghead:

Thanks TB0ne,

I have the physical BIOS on the workstation set to CapsLock on. Let me look at the settings within VMWare. Perhaps there is something there. Great idea :)

Ken

mrmazda 05-25-2019 12:47 AM

Quote:

Originally Posted by taylorkh (Post 5998207)
A number pad is supposed to input NUMBERS

The IBM engineers who designed the PC AT 101 key keyboard to replace the original 84 key keyboard 35 years ago were oblivious to the insanity of a pair of side-by-side cursor keysets using in part a 10-key keypad that doesn't provide always the functionality of a 10-key adding machine. How a bunch like that got hired is a mystery. The I/O system that put a NUM key on a 101 key keyboard is the legacy we were stuck with even as multitasking and and multiuser operating systems evolved to support more than one set of I/O. This ancient technology's continuing negative impact on efficiency is a scourge.

Some distros work around this idiocy a bit better than others, and same for BIOS. IME, UEFI BIOS are more resistant to the kernel's insistence on switching NUM off at every opportunity. The kernel should have a build option to have the opposite effect. That it does not would be another mystery but for the continued existence of keyboards that do not have both sets of keys, terrible things plaguing most laptops.

openSUSE provides /etc/sysconfig/keyboard KBD_NUMLOCK= that accepts yes, no, bios or "" that helps on the vttys. Systemd can provide a service that contains only "ExecStartPre=/bin/sh -c 'setleds -D +num < /dev/%I'". Booting Buster on my UEFI machines I still haven't figured out how to keep the kernel from initializing every vtty to NUM off, contrary to the BIOS on state. :(

taylorkh 05-25-2019 08:07 AM

Thanks mrmazda,

I knew I should have kept my Osborne. I just looked in the June 1983 issue of The Portable Companion (an Osborn Corp. magazine I happened to save) and found a picture of the keyboard on the Osborne Executive. Digits 0 - 9, a period and <Enter>. The operating system CP/M+ (AKA CP/M 3.0) overcame the CPU's memory limitation by paging in RAM 16k at a time. The Z80 saw its 64k limit as 4 16k pages while the system actually had 128k. No 640k ceiling. Score - Osborne: 2, IBM: 0

On the other hand... Osborne, at the time the fastest growing company in history, became the fastest collapsing company in history. I wonder if that record still stands? They announced the Executive model with 2X the RAM and 2X the diskette capacity of the original O1 and a full 80 column display at a cost only a little more then the O1. This was not a good move when they had warehouses full of O1s which they could no longer give away. That was step 1 - pull pin from grenade. The second step, place grenade in pants, was accomplished by announcing the "IBM compatible" Executive II which was not even on the drawing board much less ready for production. This totally undermined sales of the otherwise excellent Executive model.

Osborne went bankrupt less than a month after I purchased my Executive. I heard that the dealer was having a clearance sale on Osborne stuff. When I called I was told it was LAST weekend. They still had a few items, what was I looking for? I told the fellow I would take a copy of dBase II if the price was right (it went for $800 retail). "We have one, the package is open as we used it as a demo. Still has registration papers. $100" I am on my way I said!

Ken

scasey 05-26-2019 11:46 PM

Finally got an opportunity to check my BIOS...didn't find a place to set the numlock there, but when the 'puter finished booting, the numlock was on. Not at all sure why. Sorry.

Running cinnamon on a CentOS 7 desktop.


All times are GMT -5. The time now is 08:14 PM.