Opened 9 years ago

Last modified 2 years ago

#6488 assigned enhancement

Allow to invert Num Lock

Reported by: rq Owned by: nobody
Priority: normal Milestone: R1
Component: Preferences/Keymap Version: R1/alpha2
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Some laptop manufacturers (AFAIR the list includes at least Toshiba, HP, Acer, and MSI) have really sloppy NumLock implementation which basically prevents it from being useful.

The problem is: when NumLock is enabled, the keys that have numeric pseudo-keypad in Fn layer turn into permanent keypad, which in turn means that one cannot enter ordinary letters with them until NumLock is off again.

At the same time, while NumLock is off, pressing Fn+those keys produces what the numeric keypad keys would produce with NumLock off – they act as cursor control keys.

Luckily, that doesn't include Dell, which I'm a happy user of. :) Dell has a slightly different design: even with NumLock enabled, the keys in question keep entering letters until I press Fn+those keys. And if I turn NumLock off, these keys start acting as cursor control keys, just like on all other laptops.

My idea is that we could introduce software-emulated implementation of what Dell laptops do in BIOS: a checkbox in the keymap preferences which would make the OS invert treatment of numeric keypad keys. In that case, with NumLock off, they would enter numbers, and with NumLock on, they would produce arrows (or alternatively, they could simply ignore NumLock and always produce numbers, like in OS X). If this would work, it would be simply great!

One thing I'm not sure about is whether laptops would try to do anything "smart" upon triggering NumLock status programmatically. If not (this would need testing), then Haiku could even turn that led on and off to reflect status of NumLock as seen by applications.

Change History (7)

comment:1 in reply to:  description Changed 9 years ago by rq

Replying to rq:

Luckily, that doesn't include Dell, which I'm a happy user of. :) Dell has a slightly different design: even with NumLock enabled, the keys in question keep entering letters until I press Fn+those keys. And if I turn NumLock off, these keys start acting as cursor control keys, just like on all other laptops. .

A small clarification: when I turn NumLock off, these keys keep entering letters, but when pressed with Fn, they act as cursor control keys, just like on all other laptops. In other words, regardless of NumLock state, the keys always enter letters until I use Fn, and only then do they do what numeric keypad keys do with respect to current NumLock state.

Last edited 9 years ago by rq (previous) (diff)

comment:2 Changed 7 years ago by rq

18 months later, I'm now thinking it would probably make more sense to simply ignore NumLock altogether, and always act as if it were on. Any objections?

comment:3 Changed 5 years ago by pulkomandy

On my thinkpad, the num-keys are not reachable with Fn at all. The only way to reach them is to enable Num Lock. There is, as far as I can tell, no way to use them as arrow keys at all.

Anyway, it is possible to do what you suggest by swapping characters in the keymaps, however, this needs to be an option (because not all laptops behave the same).

Ignoring num lock state and always putting numbers there might work, and seems to be the most straightforward way. No one is using 83-key PC-AT keyboards anymore, I hope?

comment:4 in reply to:  3 ; Changed 5 years ago by rq

Replying to pulkomandy:

On my thinkpad, the num-keys are not reachable with Fn at all. The only way to reach them is to enable Num Lock. There is, as far as I can tell, no way to use them as arrow keys at all.

Interesting. And somewhat hard to believe... :)

Anyway, it is possible to do what you suggest by swapping characters in the keymaps, however, this needs to be an option (because not all laptops behave the same).

Ignoring num lock state and always putting numbers there might work, and seems to be the most straightforward way. No one is using 83-key PC-AT keyboards anymore, I hope?

I initially suggested inverting NumLock as an option, but now I think that instead, ignoring NumLock, not inverting it, could be an option. Then again, it could be the default and only way, I wouldn't mind.

Now that I think of it, with Haiku's current implementation of keymaps (where the keymaps specify not only text input keys, but command keys as well) this change could probably be incorporated into all the stock keymaps that Haiku ships. The only key that appears to be difficult to override that way is the NumLock key itself, which becomes meaningless. I think it could be used to enter the = character or become a Clear button, like it is on Macs, but it probably should be possible to give it back its NumLock functionality, should anyone want that.

comment:5 in reply to:  4 Changed 5 years ago by axeld

Replying to rq:

Replying to pulkomandy:

On my thinkpad, the num-keys are not reachable with Fn at all. The only way to reach them is to enable Num Lock. There is, as far as I can tell, no way to use them as arrow keys at all.

Interesting. And somewhat hard to believe... :)

On keyboards without a dedicated block for numbers, the numlock key often changes a block of existing keys (like UIO/JKL/M<> to 789/456/123). Therefore, there is no way to use those as arrow keys -- it's either their original key or the number block.

comment:6 Changed 5 years ago by luroh

Type: bugenhancement

comment:7 Changed 2 years ago by axeld

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.