Topic: [3.63] "NUMPAD 0" registering as "0"  (Read 1967 times)


BlankPaper

« on: August 21, 2020, 10:23:36 PM »
Version: Unreal World 3.63, Steam build, modded

What happened: Rarely, pressing "NUMPAD 0" acts as if pressing "0" (kick), bringing up the "Where To Kick" prompt menu.

What's expected: "NUMPAD 0" should always register as "NUMPAD 0".

Steps to reproduce: Hit "NUMPAD 0" several times in rapid succession or keep it pressed down, the kick prompt should appear eventually.

Notes: Interval between two misregistered keypresses is very inconsistent, it can take 1 to 10 seconds of holding down the key for the prompt to appear with a Keyboard character repeat set to short delay and fast repeat rate.
« Last Edit: October 04, 2020, 03:53:48 PM by Sami »

Sami

  • UnReal World creator
  • Administrator
  • Member
  • *****
  • Posts: 949
  • Total likes: 2169
  • UnReal World creator
    • View Profile
    • UnReal World
« Reply #1 on: September 21, 2020, 04:00:53 PM »
Can't reproduce. Anybody else can see this happening?
Sounds quite a bit system/setup related, and I don't see too much possibilities we could check or do about it.
- Sami | UnReal World creator

trowftd

« Reply #2 on: September 21, 2020, 05:03:30 PM »
This one also happens to me, also I seem to have problems with the NUMPAD 9 button too. I thought this was a problem with my keyboard. As my keyboard chatters sometimes(repeating clicks without intention). I use Logitech G810 maybe the model has something to do with it I don't really know. It doesn't happen that often but I get different commands like "Throw", "Eat" also with this(maybe because it really is a setup problem).

I also can't really reproduce it but the longer I play, the higher chance of this happening it seems to me at least.

Forgot to add: NUMPAD 9 prompts for punch NUMPAD 3 I believe prompts for last repeated attack for me(This information maybe wrong because I usually immediately click ESC and not check the command).
I edited again with checking something and numpad 3 actually registers as "3" not throw.
« Last Edit: September 21, 2020, 05:31:49 PM by trowftd »

Sami

  • UnReal World creator
  • Administrator
  • Member
  • *****
  • Posts: 949
  • Total likes: 2169
  • UnReal World creator
    • View Profile
    • UnReal World
« Reply #3 on: September 27, 2020, 05:45:23 PM »
Thanks for the follow-up, trowftd. Very vague issue, especially if the chances for failures accumulate the longer you play. These gotta be be quite rare problems, and theirs origin remains a mystery to me.
I checked SDL2 bugzilla and there's bunch of reports about wrong keys getting registered AND multiple keyboard events getting triggered at once, but these were mostly related to virtual keyboards and exotic keyboard layouts.
However, this still indicates things can go wrong in the ways described. I'm afraid there's not much I can do, but I'll check the code just in case.
- Sami | UnReal World creator

trowftd

« Reply #4 on: September 27, 2020, 10:42:24 PM »
I tried reproducing the bug after I posted the message. I remember this bug from my playtimes but never really bothered to open a topic about it as I thought this was a keyboard issue.

Now as far as my reproducing attemps go, I can't seem to reproduce it really. Maybe the "bug" fixed itself I don't really know. Thanks for checking the code for us though  ;D

Sami

  • UnReal World creator
  • Administrator
  • Member
  • *****
  • Posts: 949
  • Total likes: 2169
  • UnReal World creator
    • View Profile
    • UnReal World
« Reply #5 on: October 04, 2020, 03:20:40 PM »
I tried reproducing the bug after I posted the message. I remember this bug from my playtimes but never really bothered to open a topic about it as I thought this was a keyboard issue.

Now as far as my reproducing attemps go, I can't seem to reproduce it really. Maybe the "bug" fixed itself I don't really know. Thanks for checking the code for us though  ;D

Okay, thanks for the follow-up. So this is likely pretty much system/setup/keyboard dependant issue. If it went away for you on its own, that gives some hope for the people who've encountered the issue.
- Sami | UnReal World creator

Credit

« Reply #6 on: October 29, 2020, 04:27:32 PM »
Seen this in 3.52, actually having backup'ed the exe I just tried holding down NUMPAD 3 and the game asked me to select a target as if I hit NUMPAD 1.

JP_Finn

  • Honorary Lifetime Supporter
  • Member
  • *
  • Posts: 778
  • Total likes: 386
  • Thawed Finn in SoCal
    • View Profile
« Reply #7 on: October 29, 2020, 05:48:26 PM »
Seen this in 3.52, actually having backup'ed the exe I just tried holding down NUMPAD 3 and the game asked me to select a target as if I hit NUMPAD 1.

Number 3 is to "last attack you made" so it's likely from there. But shouldn't trigger from NumPad (not with NumLock on)

edit: as per wiki (also listed in-game: '?' then scroll down to combat): fighting and running away
« Last Edit: October 29, 2020, 05:56:24 PM by JP_Finn »

trowftd

« Reply #8 on: June 28, 2021, 12:39:10 PM »
Sorry for necroposting, but I think I found a possible solution for this. Some keyboards or standalone tenkeys(a "keyboard" with just the numeric keypads) configure their keys as the number rows above qwerty, I think this creates a problem when both tenkeys and rows are configured. This bug occurred again while I was testing 3.70b.

For a possible solution: Turn off your "NUMLOCK" if it is activated. In some keyboards activating Numlock results in tenkeys registering as number rows to override any tenkey commands like left, right, end, home, page down and such.

I am using a Logitech G810 Orion btw, this could be helpful to know.

My keyboard consistently registers "NUMPAD 0" as kick(as this is the key for kick in number rows). But after I turn off num lock it does not. I cannot believe that the solution was this easy :P, I am reviving this old post but maybe someone else will search for something like this, it is at least a possible solution.
« Last Edit: June 28, 2021, 11:25:44 PM by trowftd »

ineedcords

« Reply #9 on: June 28, 2021, 08:40:26 PM »
Just to add to this:
1) I also experienced this issue exactly as described. "Turn off your NumLock" suggestion, does not fix the problem for me.
2) In addition, I also experienced CTRL+NumPod6 (i.e. strafe-right command) failing to "register"; in other words pressing CTRL+6 I expect PC to move 1 tile to east but it stayed where it was.
(I am using Unreal World 3.70beta, Steam build, almost-unmodded except that rope quick cutting recipe)



Edit: I was in game just now & noticed another impact of this NumPad Bug.
As you know, when one have items on the ground and would like to [p]ush to an animal, one gets the "Select Target" popup window on the right hand side of screen, which auto-numbers potential push-to targets such as:
[1] Dog1
[2] Dog2
[3] Bull1
[4] Sheep1.
In this popup window, "<selection indicator> line" always starts with line number 1 (the top most option in the list).
As is usual with UrW controls one can JUMP to a selection using the keyboard digits such as 1, 2 ... using the main row number keys (above QWERTY etc) which is a final choice instruction.
Alternatively one can browse target list using various keys such as PageUp/PageDown keys but one can also use NumPad Keys such as NumPad8(up)/NumPad2(down) as well as NumPad4(left)/NumPad6(right).

Now here is the impact of the bug: in this screen, if one presses the key NumPad2 for example with the intention to browse the target list (i.e.: move down in the list), UrW occasionally, in error I presume, takes that key as keyboard-alphanumeric-number-2 and thus takes it as a final choice instruction rather than browse instruction.
« Last Edit: June 28, 2021, 09:55:30 PM by ineedcords »
This could be a good day to utilize your squirrels hides.

trowftd

« Reply #10 on: June 28, 2021, 11:23:04 PM »
Yeah, this problem seems to stem from the fact that keyboard do count numpad keys as number rows, this looks like something Sami can't fix as it looks like keyboard brand related. Can you tell me your keyboard brand? @ineedcords I should add mine on the possible solution post as it would be helpful to know.

ineedcords

« Reply #11 on: June 29, 2021, 01:01:29 AM »
Yeah, this problem seems to stem from the fact that keyboard do count numpad keys as number rows, this looks like something Sami can't fix as it looks like keyboard brand related. Can you tell me your keyboard brand? @ineedcords I should add mine on the possible solution post as it would be helpful to know.

@trowftd,
UrW is using SDL2 under the hood and this appears to be an SDL2 bug. There's quite a few numpad/numlock related bugs in SDL2 issues page, here:
https://github.com/libsdl-org/SDL/issues?q=is:issue+numpad+

I hope SDL guys fix it soon...

In response to your question my keyboard is this one: https://www.amazon.co.uk/gp/product/B017NQ8OUQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Edit: Forgot to add, I am using DVORAK keyboard layout, in case anyone else experiencing the issue AND using DVORAK or similar non-typical layouts.
« Last Edit: June 29, 2021, 01:38:43 AM by ineedcords »
This could be a good day to utilize your squirrels hides.

trowftd

« Reply #12 on: June 29, 2021, 11:48:29 AM »
Ah I see... I read about some specific keyboards registering numpads as rows no matter what. But that was a standalone tenkey keyboard. I should keep in mind to try this at other games that use SDL2 just to see what happens.
« Last Edit: June 29, 2021, 11:50:15 AM by trowftd »

PALU

« Reply #13 on: June 29, 2021, 02:58:52 PM »
I haven't had any problems with my brand new character, but I know of at least one other game where numlock suddenly stopped working, but disabling numlock caused the numeric keypad to behave as it did previously. Neither the game nor the HW had been updated between it working as normal and it started working only when inverted, so I suspect it was caused by a Windows update.

ineedcords

« Reply #14 on: June 29, 2021, 03:29:04 PM »
Ah I see... I read about some specific keyboards registering numpads as rows no matter what. But that was a standalone tenkey keyboard. I should keep in mind to try this at other games that use SDL2 just to see what happens.
Yup, that's a good approach. Unfortunately usually it is a long list of factors combined that generate the bug which makes it difficult to pinpoint.
Here is an example from another game, I guess the issue (bug) title says it all: "Numpad keys don't work properly since SDL2 #626" https://github.com/JACoders/OpenJK/issues/626

Hopefully an update to SDL2 will fix it soon while Sami/Erkka keep investing their time rather on making this game even greater! :)
This could be a good day to utilize your squirrels hides.