tb Use ps2kb MBus to handle C-S
This commit is contained in:
@ -255,10 +255,11 @@ bool interp_runstring(char *string, InterpResult **res, bool interactive) {
|
|||||||
proc_run(app);
|
proc_run(app);
|
||||||
|
|
||||||
if (wait) {
|
if (wait) {
|
||||||
|
uint8_t key = 0;
|
||||||
while(proc_pollstate(app) != 4) {
|
while(proc_pollstate(app) != 4) {
|
||||||
if (interactive) {
|
if (interactive) {
|
||||||
int32_t key = dev_cmd(&ps2kbdev, DEV_PS2KBDEV_READCH, NULL, 0);
|
int32_t read = ipc_mbusconsume("ps2kb", &key);
|
||||||
if (key > 0 && (uint8_t)key == C('S')) {
|
if (read > 0 && key == C('S')) {
|
||||||
proc_kill(app);
|
proc_kill(app);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user