VOGONS


First post, by swit

User metadata
Rank Newbie
Rank
Newbie

Hello again,

Is it possible to somehow map keys via batch files, like in PSP port of DOSBox? Unfortunately, as far as I know, ".map" file can't be changed on the fly (when the program is already running). In PSP version it works as follows:

You can define key maps in DosBox by typing INPUTMAP pspbutton keystroke and then runing the game with INPUTMAP exec game.exe f […]
Show full quote

You can define key maps in DosBox by typing INPUTMAP pspbutton keystroke and then runing the game with INPUTMAP exec game.exe
for example if I want to run Commander Keen 4 with dpad as the arrow keys on the keyboard and X as enter and [] as alt this would be in my dosbox.conf:

Mount c Ms0:\dos
C:\
cd keen4
INPUTMAP up up
INPUTMAP right right
INPUTMAP down down
INPUTMAP left left
INPUTMAP cross enter
INPUTMAP square alt
INPUTMAP exec keen4e

Below shows what each PSP button is when its mapped.

dpad up = up
dpad down = down
dpad left = left
dpad right = right
square = square
cross = cross
triangle = triangle
square = square
left trigger = ltrigger
right trigger = rtrigger
select = select
start = start

All of the computer keys make logical sense I.E. a = a, enter = enter, space = space however to map a numpad key add num_ in front so num_9 = Numpad key 9. You would be surprised how many games use the numpad (Home Alone to name one)

Thanks to this solution INPUTMAP command can be set via external BAT file and allows to create the unique mappings for each game.

I've read some old posts from 5 years ago which stated that it wasn't possible in PC version back than. I can't find this feature in current dosbox remade. What about SVN builds, unofficial compilations and patches? If there is nothing like this as of yet maybe someone will be willing to port this feature from PSP dosbox sourcode? (I know it's a lot of work 🙁)

Thanks in advance!