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?

Thanks!
Let Vogons be Vogons
MarownIOM
Newbie
 
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
Nilex
Newbie
 
Posts: 33
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
ripsaw8080
DOSBox Author
 
Posts: 4100
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 (http://www.autohotkey.com). 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.
Osprey
Member
 
Posts: 209
Joined: 2017-7-27 @ 21:32


Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 3 guests