diff --git a/user/tb/interp.c b/user/tb/interp.c index 8c96427..613d033 100644 --- a/user/tb/interp.c +++ b/user/tb/interp.c @@ -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; }