jeffpar / pcjs

The original IBM PC and other machine emulations in JavaScript
https://www.pcjs.org
Other
822 stars 124 forks source link

trying to Press Ctrl-C or Ctrl sends Ctrl-Q and doesn't stops if i don't reboot #30

Open ghost opened 3 years ago

ghost commented 3 years ago

i was trying to abort a command in DOS Prompt using Ctrl-C , but when i try, it keeps sending Ctrl-Q , i dont know why and it only stops if i reset machine or press ctrl-alt-delete

jeffpar commented 3 years ago

Which PCjs machine were you using (provide the URL), what kind of host machine were you running on (Windows PC? Mac? iPad?), if it was an iPad then what kind of keyboard were you using (on-screen or Bluetooth), and what browser were you using (Safari? Chrome? Edge? Firefox? other?)

I just tested a machine running PC DOS 2.00 and Ctrl-C worked fine. There are hundreds of combinations though.

ghost commented 3 years ago

Windows 1.01 on EGA , works with Other DOS Machines too , my host machine is running Windows 10 Tablet PC i use Chrome Browser . both On-Screen and PC's Keyboard give same results: Ctrl-Q image

ITAC85v2 commented 1 year ago

I noticed this bug about three or four years ago with any keyboard combination that includes the Right Control key. I last used the site about 9 months ago and was still a bug if I recall correctly. I haven't narrowed it down to neither specific configurations nor specific browsers and their respective versions, but all I can really say is it was an issue with Chrome on Windows 10/11 (x64) with any DOS/Windows config in PCJS when using a physical keyboard. I'm aware that sometimes browsers don't emit keyup/keypress events. These scenarios are usually mitigated by simply pressing the key again, however this was not the case. Which leads me to believe it's either an oversight in the code for key input listeners or is a bug with the browser itself. Now, I have yet to dig into the code to eliminate which but this comment shall at least give some info.

ITAC85v2 commented 1 year ago

The only reason why I found the bug was thanks to the habit of pressing Right Control to unlock the mouse pointer in Virtualbox. Every time I would do that, though, I would encounter this bug and was very frustrating. Had I decided to report the issue when I noticed it the first time, it could have been patched by now.