tb Use ps2kb MBus to handle C-S

This commit is contained in:
2025-11-11 23:49:51 +01:00
parent f8863d19bd
commit a530304e18

View File

@ -255,10 +255,11 @@ bool interp_runstring(char *string, InterpResult **res, bool interactive) {
proc_run(app);
if (wait) {
uint8_t key = 0;
while(proc_pollstate(app) != 4) {
if (interactive) {
int32_t key = dev_cmd(&ps2kbdev, DEV_PS2KBDEV_READCH, NULL, 0);
if (key > 0 && (uint8_t)key == C('S')) {
int32_t read = ipc_mbusconsume("ps2kb", &key);
if (read > 0 && key == C('S')) {
proc_kill(app);
goto cleanup;
}