cosmos72 / twin

Text mode window environment. A "retro" program for embedded or remote systems, that doubles as X11 terminal and text-mode equivalent of VNC server
Other
654 stars 38 forks source link

twin --hw=x11 has no numeric pad #71

Closed jafcobend closed 2 years ago

jafcobend commented 2 years ago

I'm running TWIN 0.9.0 (ff76a04). I've just started doing some serious work with it but I stumbled into the numeric keypad isn't working regardless of whether the [NUMLOCK] is on or off. Its either simply ignored or it beeps... every key, even the symbols and [ENTER]. This is specifically when using TwTerm. I don't know of any TWIN apps beyond that allow text entry. The dialog for "file | execute" shows gibberish when typing on the numeric keypad.

I'm still currently on Devuan 1 (equiv Debian Jessie). I'll try it on the latest version of Devuan when I get a chance later today.

cosmos72 commented 2 years ago

Confirmed. It's probably a very old bug due to intercepting [NUMLOCK] instead of letting it have its normal effect. I'll check if there is some internal option or escape sequence to fix it.

jafcobend commented 2 years ago

Thanks!!

cosmos72 commented 2 years ago

I checked, it's really missing - there's a probably ancient /* TODO */ in its place at https://github.com/cosmos72/twin/blob/master/server/hw/hw_x/keyboard.h#L95

I'll try to find a little time to implement it.

cosmos72 commented 2 years ago

Fixed in commit 5ce47cde7ec42df2c1ba68bab8f5ca0ce7520df6.

If numeric keypad still does not emit numbers when NumLock is active, you may need to printf '\033>' in each (broken) terminal inside twin.

jafcobend commented 2 years ago

Thanks for this! I'm baking some packages for testing on my system now. I'll let you know how it works. It will be fun to get my 3840x1024 TWIN desktop back. ;-) The numeric keypad is pretty important... at least to me.

jafcobend commented 2 years ago

Well... it half works. I'm not sure why hitting the [NUMLK] causes a beep in the terminal. But the real half that doesn't work ... is the navigation keys when [NUIMLK] is off. I know. I know. I think the last time I used the numeric pad for navigation was on the original IBM PC. But I like to test things ...