CTRL Codes

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3194
    Phil
    Participant

    Your great emulator is very useful for programs other than games, e.g. for running general BAT files.
    Sometimes with these it is useful to be able to Escape from the BAT file, say after a PAUSE, by typing <CTRL> C.
    However, the emulator does not seem to generate the normal code for <CTRL> C and instead generates a printable character.
    Is there any way to generate the normal <CTRL> C code to do an Escape?

    Phil

    #3195
    admin
    Keymaster

    Hello,

    thank you very much. Can you please post the but file? I need simulate the issue. I run command “pause”, but it orders you to “Press any key…” and “any” key really works;)

    Best regards,
    Tony

    #3229
    Phil
    Participant

    Thanks for reply.
    Apologies for typo in my original post – I meant to say CTRL rather than CTRC. I have now edited my post to correct that.
    A “PAUSE” command in the BAT file correctly generates a Pause with an instruction to “Press any Key to continue”
    On my normal keyboard ( on my Windows PC ) I can then do a

      <CTRL> C

    and it causes the BAT file to terminate i.e. not execute any following lines in the BAT file.
    I would like to do the same with your emulator. However in the emulator, if I create a

      <CTRL> C

    key and use this after a PAUSE then it acts like any other key and the BAT file continues to the next line. If I press this key when a C:/ prompt is showing it generates a printable character. So it is not generating the same code as

      <CTRL> C

    does on a normal keyboard in Windows.
    So, is there any way to create a key to generate the code to terminate the BAT file – like I can do in Windows ?

    I hope that this is clearer now.

    Phil

    #3230
    admin
    Keymaster

    Hi,

    thank you very much for explanation. It’s clear now. First is necessary differentiate MS-DOS command line and windows command line. MS-DOS supported less commands and probably a bit differently. I don’t have original MS-DOS installed now and can’t test CTRL+C functionality. But I remember CTRL+BREAK. In my childhood I used Pascal language and I used ctrl+break often. Both ctrl+c and ctrl+break don’t work in desktop dosbox neither android version. But here one guy wrote patch for ctrl+break:

    https://sourceforge.net/p/dosbox/patches/229/

    What do you think? Maybe we can try it’s functionality. But probably next week, I have some things half-done and I want finish them first.

    Best regards,
    Tony

    #3232
    Phil
    Participant

    Hi Tony
    Thanks for further reply.
    As you say, neither CTRL+C nor CTRL+BREAK work in Windows DOSBox. I had not tried it before but just tried and you are right. It would have been nice to have a BAT Exit facility in Magic DOSBox but it is not essential so please get on with your more important things. I read your links but did not really understand them.
    Looking forward to trying your next Ver with the system independent transparent keyboard.
    Thanks for all your hard work.
    Cheers
    Phil

    #3233
    admin
    Keymaster

    Hi Phil,

    thank you very much. I’ll find time next week and will try the patch. I’ll send you the result.

    Best regards,
    Tony

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.