How to set NUMLOCK "on" in Photon

I need to set NUMLOCK status (not indicator led) “on” under photon.
How can I do that?

When I turn NUMLOCK “on” in BIOS on bootup, it turns down when Dev.ansi starts.

If I set NUMLOCK “on” with
stty +numlock > /dev/con1
it turns down when Photon start even if kbd start with -R optoin.

In photon I can edit keyboard tables located in /usr/photon/keyboard and set
Actions {
then press <Num_Lock>
}
this action ONLY takes plase when any Modifier pressed.
But I need set NumLock “on” unconditionaly.

How can I do this??? :cry: :cry: :cry: :cry:

The problem with the led is related to the fact that the led is a physically state, but that NumLock on is a logical state controlled by the keyboard driver. Usually this driver updates the physical keyboards LED to reflect the true condition.

If you are trying to control NumLock within a single program the solution is easy, just uppercase all input. If you want NumLock always on for all processes, you could modify the driver. Just make sure that their is a way to lowercase things, eg. press Shift, unless this is a permanently embedded system with no need.

Very old hacks like me will remember that IBM mainframe line printers originally didn’t always have lowercase, and somehow the world didn’t come to an end. I remember when I was admonished for having run a program that had some lower case in it. The guys in the computer room had to change the chain on the printer for this to work right. They didn’t like doing this because the non-lower case chain had double the letters and so it was usually twice as fast.

There’s actually a description of exactly how do this in the help for the devctl() function. It’s a little obscure but it’s not TOO bad. And of course you get to pretty much copy paste it out of the help. You could have a simple program that turns on Num Lock and run that program when Photon starts by putting in your phapps file.

-James Ingraham
Sage Automation, Inc.

Editing kdef file so that

works!