joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.82k stars 383 forks source link

“4” when lid switch close #2434

Open 14725 opened 3 years ago

14725 commented 3 years ago

Describe the bug On a laplop, when closing the lid switch for the first time, continuing "4" is inputted. If I press other key, the "4" will stop.

If close the lid switch again, it disappears.

To Reproduce Steps to reproduce the behavior:

  1. Start DOSBox-X
  2. close the lid switch with DOSBox-X staying active.
  3. open the lid switch
  4. "4" is appearing.

Expected behavior Nothing happen in the DOS box.

Screenshots command_000

Environment (please complete the following information):

Additional context

Wengier commented 3 years ago

I have not yet been able to reproduce this problem on my Windows 10 laptop yet. Tried with MinGW 32-bit SDL2 binary with default configuration as mentioned but have not seen the issue by now. So it is likely the issue only happens on specific laptops and/or systems with certain configurations.

rderooy commented 3 years ago

This seems specific to your machine. Is it possible that when you close your screen that it perhaps touches the key? These days there is often very little space between screen and keyboard. I have seen keyboard imprints on screens!

14725 commented 3 years ago

Sorry, I don't know what to do... however I'm sure it is not the screen that touches the key. Maybe it is my laptop's fault. With spy++ I got some strange messages:

<000089> 00020590 P WM_KEYDOWN nVirtKey:00FF cRepeat:1 ScanCode:05 fExtended:1 fAltDown:0 fRepeat:0 fUp:0
<000090> 00020590 P message:0xC231 [已注册:"UxdDisplayChangeMessage"] wParam:00000000 lParam:00000000
<000091> 00020590 P message:0xC231 [已注册:"UxdDisplayChangeMessage"] wParam:00000000 lParam:00000000
<000092> 00020590 P WM_KEYDOWN nVirtKey:00FF cRepeat:1 ScanCode:63 fExtended:1 fAltDown:0 fRepeat:1 fUp:0