Num Lock state not obeyed

Bug #1177064 reported by _aD
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Low
Unassigned

Bug Description

When typing into text boxes such as the save game window or multiplayer chat window, the keyboard's numpad number keys behave inconsistently. Some number keys function correctly and others seem to behave like Num Lock is off. When tested I left Num Lock enabled.

To reproduce:
Start a game
Open the save game window
Using the number pad, try to enter 0123456789 in the save game file name

Start a multiplayer game
Open the chat window
Try to enter 0123456789 into the chat text box

Revision history for this message
Kiscsirke (csirkeee) wrote :

True with r6568 on windows too.

Changed in widelands:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Kiscsirke (csirkeee) wrote :

But it did work correctly in an Ubuntu VM, so it might be a windows-only bug.

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
wl-zocker (wl-zocker) wrote :

The behavior is really strange (tested on Win7, r7056).
In the text areas (chat and save dialog), there are four possibilities (I do not know when which one happens):
- Nothing happens.
- All numbers can be typed in.
- Only 3, 5 and 9 can be used. 1, 7, 4 and 6 move the cursor to the beginning/the end of the line or one letter forward/backward. 2 and 8 do nothing. In the chat, the 2 does strange things.
- Once, it was even possible to change the game speed although the cursor was in the chat window.

In the normal game, there are only two possibilities:
- NumLock enabled (I can type numbers outside of Widelands): 7 brings me to my starting point, 3 and 9 change the speed, I can scroll with 2, 4, 6, 8.
- NumLock disabled: Nothing happens. When I hold down Shift, Ctrl, or Alt, I can scroll with 2, 4, 6, 8. The other keys still do nothing. I think this is a bug.
- It is not possible to save a location (Ctrl + number) or to go back to it by using the number pad.

My suggestion is the following:
In the text areas: NumLock should behave like outside of Widelands. Enabled = numbers; disabled = move cursor.
In the normal game: The keys should always have their "special" functionality (change speed, move, go to starting position), independant of whether NumLock is enabled or not. (Reason: I do not always look at the state of NumLock when I want to change the speed.) For saving and going to locations, the numbers above the letters can be used.

Comments?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

I think we should reinvestigate that after moving to SDL2.

Changed in widelands:
status: Expired → Confirmed
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Based on a forum post (see point 2), NumLock is still problematic: https://wl.widelands.org/forum/topic/1728/

Revision history for this message
GunChleoc (gunchleoc) wrote :

On Ubuntu, when starting Widelands, SDL does not read the Num lock state off the operating system. So, you have to press it first. This will of course change the Num lock state in the OS as well. This means that if the Num lock was on in your OS and you then switch it on in Widelands, it will be switched off for the rest of the OS.

Revision history for this message
GunChleoc (gunchleoc) wrote :
GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
milestone: none → build19-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Confirmed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

There is some activity on the SDL bugtracker for this:

https://bugzilla.libsdl.org/show_bug.cgi?id=2736

We will have to let them fix it.

Hacking the numlock state for speed changes is not a good idea, because people might want to use the keypad numbers for the location markers.

Changed in widelands:
status: Confirmed → Won't Fix
milestone: build19-rc1 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.