From 876ee194bcb1359753e460730a5b4183ae8b3b2d Mon Sep 17 00:00:00 2001 From: an_achronism <87213873+an-achronism@users.noreply.github.com> Date: Wed, 1 Mar 2023 02:19:11 +0000 Subject: [PATCH] Unicomp New Model M broken Pause/Break key fix The PS/2 controller code for Unicomp's current generation PS/2 keyboard sends the wrong scancodes when Ctrl + Pause (which should be Break) is pressed. Instead of it sending the Break sequence... E0 7E E0 F0 7E ... representing a press of Scroll Lock, which is Break because Ctrl is being pressed, it instead sends... E0 77 ... representing a press of Num Lock, which is just the old way of getting Pause. Since the E0 77 coming from the controller is not a normal sequence, this workaround does not interfere with Ctrl + Num Lock, which still Pauses as it should. --- converter/ibmpc_usb/ibmpc_usb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/converter/ibmpc_usb/ibmpc_usb.cpp b/converter/ibmpc_usb/ibmpc_usb.cpp index 28895444..247d556c 100644 --- a/converter/ibmpc_usb/ibmpc_usb.cpp +++ b/converter/ibmpc_usb/ibmpc_usb.cpp @@ -914,6 +914,7 @@ uint8_t IBMPCConverter::cs2_e0code(uint8_t code) { case 0x72: return 0x3F; // cursor down case 0x74: return 0x47; // cursor right case 0x75: return 0x4F; // cursor up + case 0x77: return 0x00; // Unicomp New Model M Pause/Break key fix case 0x7A: return 0x56; // page down case 0x7D: return 0x5E; // page up case 0x7C: return 0x7F; // Print Screen