First post, by decuser
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 😀.
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.
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