added switching ca keys by kbd scancode set
This commit is contained in:
26
src/86box.c
26
src/86box.c
@@ -1094,14 +1094,24 @@ pc_init_modules(void)
|
|||||||
void
|
void
|
||||||
pc_send_ca(uint16_t sc)
|
pc_send_ca(uint16_t sc)
|
||||||
{
|
{
|
||||||
/* Use R-Alt because PS/55 DOS assigns L-Alt as Kanji */
|
if (keyboard_mode == 0x8A) {
|
||||||
keyboard_input(1, 0x1D); /* Ctrl key pressed */
|
/* Use R-Alt because PS/55 DOS assigns L-Alt Kanji */
|
||||||
keyboard_input(1, 0x138); /* R-Alt key pressed */
|
keyboard_input(1, 0x1D); /* Ctrl key pressed */
|
||||||
keyboard_input(1, sc);
|
keyboard_input(1, 0x138); /* R-Alt key pressed */
|
||||||
usleep(50000);
|
keyboard_input(1, sc);
|
||||||
keyboard_input(0, sc);
|
usleep(50000);
|
||||||
keyboard_input(0, 0x138); /* R-Alt key released */
|
keyboard_input(0, sc);
|
||||||
keyboard_input(0, 0x1D); /* Ctrl key released */
|
keyboard_input(0, 0x138); /* R-Alt key released */
|
||||||
|
keyboard_input(0, 0x1D); /* Ctrl key released */
|
||||||
|
} else {
|
||||||
|
keyboard_input(1, 0x1D); /* Ctrl key pressed */
|
||||||
|
keyboard_input(1, 0x38); /* Alt key pressed */
|
||||||
|
keyboard_input(1, sc);
|
||||||
|
usleep(50000);
|
||||||
|
keyboard_input(0, sc);
|
||||||
|
keyboard_input(0, 0x38); /* Alt key released */
|
||||||
|
keyboard_input(0, 0x1D); /* Ctrl key released */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send the machine a Control-Alt-DEL sequence. */
|
/* Send the machine a Control-Alt-DEL sequence. */
|
||||||
|
|||||||
Reference in New Issue
Block a user