Multi-key Macro

General information and assistance with DOSBox.

Multi-key Macro

Postby MarownIOM » 2017-11-13 @ 22:51

I've not had much luck with the keymapper -- but I'm trying to figure out how to map a key to do multiple keystrokes.
Has anyone done this?

Let Vogons be Vogons
Posts: 1
Joined: 2017-11-13 @ 21:31

Re: Multi-key Macro

Postby Nilex » 2017-11-14 @ 19:58

Say you want to type "asd" (in that order) by pressing "F1":
    open maper
    click "a", click Add, press F1 (on your keyboard)
    same with "s" & "d"
    click Save then Exit
F1 spits out "asd" in order you added them.

Thought this practical example is simplest way to understand instead me trying to explain the counter-intuitive mapper.

If you want "a" to type out "aaa" then tough shit. No can do. There's also a way to temporarily disable the bindings while
you type (e.g. when naming a save) but I've had mixed results so I rather won't say. Maybe someone else can do that.
User avatar
Posts: 38
Joined: 2017-2-15 @ 07:08
Location: Croatia

Re: Multi-key Macro

Postby ripsaw8080 » 2017-11-14 @ 20:10

Binding order is tricky to exploit. It holds for the session in which you change the mapping, but is usually lost when DOSBox is restarted unless you happen to bind in event order. Perhaps it would work to manually reorder the events listed in the keymapper file; not sure about that, though, and even if it does work you'd have to redo it if DOSBox is ever used to write out the mapper file again.
User avatar
DOSBox Author
Posts: 4273
Joined: 2006-4-25 @ 23:24

Re: Multi-key Macro

Postby Osprey » 2017-11-14 @ 21:30

If you're on Windows, you can do this easily with a 3rd party utility, AutoHotkey ( I've done it several times for utilities that I've uploaded. Simply create the script, run it alongside DOSBox and it's like the hotkeys are part of DOSBox, even though they're not. I'm happy to give you help with that, if you'd like.
Posts: 257
Joined: 2017-7-27 @ 21:32

Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 1 guest