Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTRL-C does not work during script execution #5

Closed
SuperIlu opened this issue Apr 21, 2021 · 6 comments
Closed

CTRL-C does not work during script execution #5

SuperIlu opened this issue Apr 21, 2021 · 6 comments

Comments

@SuperIlu
Copy link
Owner

A running script can not be terminated by pressing CTRL-C

This issue is split from #3

@SuperIlu
Copy link
Owner Author

Tested this with DOSBox-X and FreeDOS running on VirtualBox.

DOSBox:
neither CTRL-C nor CTRL-BREAK do work

FreeDOS:
Both keys work and the program is terminated.

It seems there is a know issue in DOSBox for CTRL-C/CTRL-BREAK, e.g. see http://www.virtualdub.org/blog/pivot/entry.php?id=338

Nonetheless I will include a function call that should be able to enable/disable the break-keys with the default: "CTRL-C is enabled"

@sinsinpub
Copy link

yep, indeed I knew BREAK key not work on DOSBox, that's annoying.
Considering there is even no PAUSE/BREAK key on nowadays keyboard, it's nice to have a alternative hotkey (perhaps something like ctrl+z or ctrl+prtsc) to hook into break interrupt, and ofc be able to opt-in enable/disable.

@SuperIlu
Copy link
Owner Author

I'll give it a thought. jSH scripts (in contrast to DOjS scripts with the Loop() function) have no "forced" break point where the JS runtime could regularly check for such a key.
But maybe I'm able to come up with something...

@SuperIlu
Copy link
Owner Author

I did check with the author of DOSBox-X and this is the result:

  • MS-DOS and FreeDOS do support it, but only if the program reads/writes from/to the console
  • DOSBox-X does support it, but only if the program does reads from the console (this will be fixed to behave like MS-DOS/FreeDOS)
  • plain DOSBox does not support CTRL-C/CTRL-BREAK at all

There will be a new function CtrlBreak() which enables/disables CTRL-C/CTRL-BREAK handling

@SuperIlu
Copy link
Owner Author

fixed/documented in V0.8

@SuperIlu
Copy link
Owner Author

Fixed in DOSBox-X: joncampbell123/dosbox-x#2525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants