remapping keyboard shortcuts

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Florent
Um Master
Posts: 457
Joined: Sun Nov 14, 2004 5:03 pm
Location: Paris, France
Contact:

remapping keyboard shortcuts

Post by Florent »

Hi it's me again...

Sorry about the noobish question :

How can I remap the shortcut keys in CSBWin ?

I use an AZERTY keyboard so I need to change the shortcuts for attacking (QWER for attacker 1 must be changed to AZER, obviously) and moving (that JKLM period comma config just doesn't do it for me). I did try to edit the config.txt file but it seems the changes weren't taken into account... Where did I get it wrong ? Is the config.txt file properly located ?

I am using CSBWin 9.8, "out of the box", with this folder layout :

Code: Select all

CSBWindows98\modules\dungeon master-atari\config.txt
CSBWindows98\modules\dungeon master-atari\graphics.dat
CSBWindows98\modules\dungeon master-atari\Original DM\dungeon.dat
Should I move the config.txt file anywhere special to have it taken into account by CSBWin ?

Thanks for any help !
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

From what you say, you did it all correctly. What do you mean
by "weren't taken into account"? Do you mean that the original
mapping was still in effect? Or that that the new mapping does not work?
Or both.

If you commment out all the "QWER......" lines (put a semi-colon in column 1)
does that get rid of the old mappings? If not, then do you have another
config.txt nearby? If not then something very mysterious is happening.
Perhaps some ghosts of the config.

There is a config.txt for each of DM and CSB. You changed the right one?
You did change the "mscan" lines, not the "key" lines, right?

How did you change the first line:

Code: Select all

mscan 1 0051  f0 5c L  ; 'Q' = character 1 weapon / first attack
User avatar
Florent
Um Master
Posts: 457
Joined: Sun Nov 14, 2004 5:03 pm
Location: Paris, France
Contact:

Post by Florent »

Thanks Paul for your answer.
Paul Stevens wrote:From what you say, you did it all correctly. What do you mean
by "weren't taken into account"? Do you mean that the original
mapping was still in effect? Or that that the new mapping does not work?
Or both.
I meant both.
Paul Stevens wrote:If you commment out all the "QWER......" lines (put a semi-colon in column 1)
does that get rid of the old mappings? If not, then do you have another
config.txt nearby? If not then something very mysterious is happening.
Perhaps some ghosts of the config.

There is a config.txt for each of DM and CSB. You changed the right one?
You did change the "mscan" lines, not the "key" lines, right?
Yes I did change the "mscan" lines, however I also changed the "key" line for the movement bindings, here for instance :

Code: Select all

key  1 00006d 4b0000  ; 'm' = move left
key  1 00004d 4b0000  ; 'M' = move left
scan 1 00004b 4b0000  ; Keypad '4' = move left
key  1 000104 4b0000  ; SDL Keypad '4'
Paul Stevens wrote:How did you change the first line:

Code: Select all

mscan 1 0051  f0 5c L  ; 'Q' = character 1 weapon / first attack
Here's what I did :

Code: Select all

mscan 1 0051  f0 5c L  ; 'A' = character 1 weapon / first attack
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Changing the comment (what comes after the semi-colon) ain't gonna
change the effect very much. You must change the scan code (the 0051
in this example). 0051 is the scan code for 'Q'. You can see the scan codes
by playing in window size 1 and then pressing a key. The scan code for
that key will be shown in the text to the right of the viewport. Write down
the ones you need then edit config.txt.

By the way.....to maintain sanity you should also change
the comments.
User avatar
Florent
Um Master
Posts: 457
Joined: Sun Nov 14, 2004 5:03 pm
Location: Paris, France
Contact:

Post by Florent »

Harh but of course !!! I was only changing the comments ! What a dork... Sorry about that !

Thanks for the lightning fast answers, and above all thanks for the incredible CSBWin !
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”