VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

What happens when the keyboard has buffered a partial(or full) keypress packet and it receives a command? Is the packet(or packets) lost permanently, or is/are it/they resent afterwards?

So, lets say it buffered keypress A, that is read, then it has a release A buffered, but it receives a command to e.g. switch sets etc.. Will that result in the CPU permanently seeing A pressed until it's pressed and released again?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 2, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

The CPU doesn't see anything. The keystrokes are received and processed by the BIOS/OS/keyboard driver.
If the OS is switching keyboard modes, it should be clever enough to reset all of its internal keyboard state and start from scratch.

Reply 2 of 2, by superfury

User metadata
Rank l33t++
Rank
l33t++

What about already pressed keys? If I press a key(generates press keycode), then CPU reads that(registers key as pressed) and then sends a reset command while the key is still pressed, is the release/repeating press of the key still put in the buffer while it's pressed(periodically) or released(release code in the (new) scancode set)?

I also see the driver doing something odd: it disables and enables the first PS/2 port(on the Compaq Deskpro 386) each time a keypress is received(MS-DOS 5.0a prompt)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io