VOGONS

Common searches


First post, by decuser

User metadata
Rank Newbie
Rank
Newbie

All,

I've read dozens of posts about remapping keys, but none of them seem to do the job. Bear with me if you've already solved this and just point me to the answer, yes the one that I couldn't find searching!

Here is the situation. I am using GW-BASIC for old time's sake (but the issue is not GW-BASIC specific) and I need to be able to stop it from running a loop. The proper keypress from back in the day was CTRL-BREAK (which entails holding down CTRL and pressing the Pause key on a standard PC keyboard). This works fine, even today, if you hook up a standard USB keyboard to your laptop. The problem arises when you don't have or don't want to hook up another keyboard to your Macbook. The Macbook doesn't have a Pause key, a Scroll Lock key, or any of dozens of keys the typical PC has (FN13+, Num Lock, the numeric keypad, etc.).

Solutions I've tried to no avail:

Try out key combinations over and over and over 😀.

Press CTRL-F1 (with and without using F1, F2, etc. as standard function keys) and start DOSBox's key mapper. Then Press Pause/Scroll Lock, etc, add, press F12, or Tilde, or, or, or to map that key to Pause or Scroll Lock or whatever, then save and exit the key mapper.

Weird stuff happens when I try to remap Scroll Lock to another key - like when I press CTRL-F12, the stuff that I type is no longer in text, but some kind of graphics. As far as I can tell, when I remap Pause, it just works like a Pause key, not a Break key, with or without my using CTRL.

What I'd like to happen:
Remap an unused by DOSBox key to send BREAK, whatever event that is, so that I can type CTRL-WHATEVERKEY and have the GW-BASIC loop stop executing.

I looked in my ~/Library/Preferences/mapper-0.74-3.map file after saving it and it appears that something along the lines of:

key_f12 "key XXX"

would work, if only I knew what XXX should be 😀.

Additional background:

I tried looking at xev's processing of the keypress that occurs when I have the PC USB Keyboard hooked up and it's a little weird too. If I press the Pause key by itself, it brightens the screen, similar to F2's function on my Macbook, and if I press CTRL-Pause, it doesn't seem to do anything, xev doesn't get either event. However, when DOSBox is running, CTRL-PAUSE on the PC keyboard definitely causes BREAK to be sent to the program (GW-Basic in this case).

I would appreciate any helpful advice y'all could give.

My system:
MacBook Pro 15" mid-2012, 2.6 Ghz Quad-Core i7, w/16GB RAM, 1TB SSD, MacOS 10.15.2 Catalina, DOSBox 0.74-3, GW-Basic 3.20, 3.22, or 3.23

Thanks,

Will

Reply 1 of 6, by xjas

User metadata
Rank l33t
Rank
l33t

I don't have a solution for you, but I would love the answer for this too. Just replying to follow the topic...

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 2 of 6, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

The "Pause" button in the mapper isn't a key, it's an emulator event (that funnily enough, pauses emulation). Disregard it.
The "SCL" key is the one you need to add a binding to. But if you're going to bind F12 to it be aware ctrl+F12 is already bound to another event (cycles+) by default.

Simple description: http://tedfelix.com/Technology/ctrl-break-in-dosbox.html

Reply 4 of 6, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
xjas wrote on 2020-01-05, 00:54:

I don't have a solution for you, but I would love the answer for this too. Just replying to follow the topic...

more offtopic, sorry, but with the new forum, you can just click the eye icon on top of the thread to get notifications. At least that *should* work 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 5 of 6, by decuser

User metadata
Rank Newbie
Rank
Newbie

Well, well, well 😀. Thanks for the diverse replies, between the CTRL-F12 is already in use, and key_scrollock bit and the link to Felix's post, I got it worked out. I mapped backtick (just under escape) using Felix's method - results in:
key_scrolllock "key 96" "key 302"

and, wait for it, it works!
Thank you, thank you!

Reply 6 of 6, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

thanks for reporting back how you got it to work. It's always good for when others get stumped by the same problem!

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox