hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
10.95k stars 654 forks source link

ebiten: `ebiten.IsKeyPressed(ebiten.KeyEnter)` is always false on an old Windows machine #2531

Closed hajimehoshi closed 1 year ago

hajimehoshi commented 1 year ago

Ebitengine Version

6f4cb04ebb14f16ec67ef99b2b307ab959b17b7c

Operating System

Go Version (go version)

go 1.19

What steps will reproduce the problem?

See the result of println(ebiten.IsKeyPressed(ebiten.KeyEnter)) and press an enter key

What is the expected result?

true is printed when the key is pressed

What happens instead?

false is printed even when the key is pressed

Anything else you feel useful to add?

                                ..,   USER@DESKTOP-16QDNLN 
                    ....,,:;+ccllll   -------------------- 
      ...,,+:;  cllllllllllllllllll   OS: Windows 10 Home x86_64 
,cclllllllllll  lllllllllllllllllll   Host: Jumper EZbook 
llllllllllllll  lllllllllllllllllll   Kernel: 10.0.19043 
llllllllllllll  lllllllllllllllllll   Uptime: 35 mins 
llllllllllllll  lllllllllllllllllll   Packages: 4 (scoop) 
llllllllllllll  lllllllllllllllllll   Shell: bash 4.4.23 
llllllllllllll  lllllllllllllllllll   Resolution: 1920x1080 
                                      DE: Aero 
llllllllllllll  lllllllllllllllllll   WM: Explorer 
llllllllllllll  lllllllllllllllllll   WM Theme: Custom 
llllllllllllll  lllllllllllllllllll   CPU: Intel Celeron J3455 (4) @ 1.500GHz 
llllllllllllll  lllllllllllllllllll   GPU: Caption 
llllllllllllll  lllllllllllllllllll   GPU: Intel(R) HD Graphics 500 
`'ccllllllllll  lllllllllllllllllll   GPU 
       `' \*::  :ccllllllllllllllll   Memory: 3094MiB / 5992MiB 
                       ````''*::cll
                                 ``                           
hajimehoshi commented 1 year ago

Oops, on this machine, ebiten.NumpadEnter was pressed instead of ebiten.Enter.

hajimehoshi commented 1 year ago

This is an issue in the machine, not Ebitengine.

hajimehoshi commented 1 year ago

https://techtablets.com/forum/topic/keyboard-enter-key-problem/

I saw, that in the Keyboard configuration of the game, when I choose the Enter key there its Named “Enter (Numerical Pad)” Maybe this is the problem?

https://rigacci.org/wiki/doku.php/doc/appunti/hardware/jumper_ezbook_s3

FIXME Enter key misbehaving in less. Problem: e.g. man page, backslash to search, hit Enter does not work, it prints ESCOM string instad. Workaround: use Ctrl-M. Tips: xev says that Enter sends KP_Enter instead of Return, but changing keysym with xmodmap -e "keysym KP_Enter = Return" does not resolve. Use .lesskey to modifiy?