CSBwin custom keys

Custom dungeons for CSBWin. Includes all Confux 2 and 3 discussions.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
agarules
Journeyman
Posts: 98
Joined: Thu Nov 08, 2018 2:15 am
Location: England.

CSBwin custom keys

Post by agarules »

I can't change the keyboard settings for mods for CSBwin. Tried changing the settings in the dir and it still won't let me change them. I want to use "w" for move forward, "e" to turn right, "q" to turn left....etc..
Can somebody please help?
God, grant me the serenity to accept the things I cannot change,

Courage to change the things I can,

And wisdom to know the difference.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBwin custom keys

Post by Paul Stevens »

I can't say I understand exactly what you mean by
changing the settings in the dir
You need to edit the config.txt file that resides in the same directory
as your CSBwin.exe. If you are having trouble doing that then get
back to me and I can help.
Possible problems:
1) don't know how to use text editor.
2) don't understand what needs to change
3) don' know proper codes for keys
4) don't know how to add definitions
5) don't know to remove existing definitions.
6) other???
User avatar
agarules
Journeyman
Posts: 98
Joined: Thu Nov 08, 2018 2:15 am
Location: England.

Re: CSBwin custom keys

Post by agarules »

I made a backup of the config file before I started altering it. I just changed the number pad keys to q, w, e, a, s, and d for movement and saved the file. No joy. I am right-handed and find it awkward to have to use the number pad. Guess I'm to used to RTC and DSB.
Don't understand why it doesn't work. I must be missing something simple.
Thanks Paul for replying.
God, grant me the serenity to accept the things I cannot change,

Courage to change the things I can,

And wisdom to know the difference.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBwin custom keys

Post by Paul Stevens »

If you look down the config.txt file you will see that
the qweasd keys are being used for other things.
Perhaps you need to remove those other things;
most easily by putting a semi-colon in column one.

If that fails, get back to me again and I promise to
provide a config.txt that is tested and working.

I am right-handed and use the jklm,. keys quite naturally
for party movement.
That leaves the qweasdzxc keys for easy attacking moves.
User avatar
agarules
Journeyman
Posts: 98
Joined: Thu Nov 08, 2018 2:15 am
Location: England.

Re: CSBwin custom keys

Post by agarules »

Tried what you suggested, i.e. putting a semi-colon in column one. Still didn't work.
It's just that I have got so used to using the same keys for mouse and keyboard games.
Do you have a config.text that I can use for my qweasd keys?
God, grant me the serenity to accept the things I cannot change,

Courage to change the things I can,

And wisdom to know the difference.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBwin custom keys

Post by Paul Stevens »

Yep. You got a couple problems there. Try this:

Code: Select all

; *******   IMPORTANT  NOTE   *********
;
;  !!!  Every number in this file is hexadecimal !!!!!
;
;************************ Documentation *************************
;**************** COMMAND LINE OPTIONS and PARAMETERS ***********
;
; directory="directory name"
;    This is the directory where we start looking for files.
;    We also search the parent directory if necessary.
;
; repeat
;    When do a playback this causes the playback to be repeated.
;
; height=nnnn
;    Sets the window height in pixels.
;
; quick=nnnn
;    In playback mode this causes quick playback for the
;    specified number of 'clock ticks'.
;
; vblmultiplier=nnnn
;    In playback mode this causes faster playback.  Specified
;    value between 1 and 99.  Values 1 through 98 cause the 
;    graphics routines to be skipped sot that the screen is 
;    updated less often.  The value 99 is special in that all
;    normal screen updates are performed.
;
; dungeon="dungeon name"
;
; width=nnnn
;    Sets the window width in pixels.
;
; x=nnnn
;    Sets the horizontal postion of the left edge of window.
;
; y=nnnn
;    Sets the vertical position of top edge of window.
;
; size=FULL,EXTRALARGE,VERYLARGE,LARGE, or SMALL
;    Sets size of graphics (not the window!)
;
; speed=GLACIAL,MOLASSES,VERYSLOW,SLOW,NORMAL<FAST or QUICK
;    Sets the speed of the internal clock.
;
; play="filename"
;    Plays a previously recorded game.
;
; record
;    Automatically sets the program to record the player's moves.
;
; norecord
;    Overrides any automatic recording initiated by the game's designer.
;
;  *********** END OF COMMAND LINE OPTIONS and PARAMETERS ******************
;    
;
; *****************************Documentation ***************************
; ************ CONFIGURATION FILE PARAMETERS ***************************
;
; directory "directoryname"
;    Tells where the game data is located.  The parent directory
;    is also searched if necessary.
;
; place segment size srcx srcy width height dstX dsty
;    In full-screen mode this tells where the pieces of the
;    Atari screen should be placed on the video display.
;      segment = A, B, C, D, or E (viewport, text, controls, portraits, info)
;      size = 1, 2, 3, 4
;      srcx and srcy are upper left corner of portion of Atari screen
;      width and height are are size of portion of Atari screen.
;      dstx and dsty are where to put the result on the video display.
;
; scan, key, and mscan are described below.
;
;************** END of CONFIGURATION FILE PARAMETERS ******************
; 
;
;directory "c:\projects\csb\csbwin\debug\"
;
;  key translations
;
; scan  mode  <PC scan code>    <ATARI key code>
; key   mode  <PC ASCII code>   <ATARI key code>
; mscan mode  <PC VirtualKey>   <mouseX> <mouseY> <R/L>
;
; 
; Scan codes are processed in OnKeyDown.
;  Generally this is used to process non-ascii keys.
; Key codes are processed by OnChar.
;  ASCII codes are generally specified here.
; mscan codes are used to translate keypresses to
;  equivalent mouse clicks.  The x- and y-coordinates
;  are relative to the entire 320 by 200 screen.  The
;  R or L is used to designate which mouse button is
;  pressed.
;
;
; mode is the keyboard mode in effect.
; mode 1 is used while adventuring
; mode 2 is used during ReIncarnation.
;
;
key  1 00001b 00001b  ;  escape = Freeze Game
;
;key  1 00006b 480000  ; 'k' = move forward
;key  1 00004b 480000  ; 'K' = move forward
key  1 000057 480000  ; 'W' = move forward
key  1 000077 480000  ; 'w' = move forward
scan 1 000048 480000  ; Keypad '8' = move forward
key  1 000108 480000  ; SDL Keypad '8' = move forward
;
;key  1 00006c 470000  ; 'l' = turn right
;key  1 00004c 470000  ; 'L' = turn right
key  1 000045 470000  ; 'E' = turn right
key  1 000065 470000  ; 'e' = turn right
scan 1 000049 470000  ; Keypad '9' = turn right
key  1 000109 470000  ; SDL Keypad '9'
;
;key  1 00006a 520000  ; 'j' = turn left
;key  1 00004a 520000  ; 'J' = turn left
key  1 000051 520000  ; 'Q' = turn left
key  1 000071 520000  ; 'q' = turn left
scan 1 000047 520000  ; Keypad '7' = turn left
key  1 000107 520000  ; SDL Keypad '7'
;
;key  1 00002e 4d0000  ; '.' = move right
key  1 000044 4d0000  ; 'D' = move right
key  1 000064 4d0000  ; 'd' = move right
scan 1 00004d 4d0000  ; Keypad '6' = move right
key  1 000106 4d0000  ; SDL Keypad '6'
;
;key  1 00006d 4b0000  ; 'm' = move left
;key  1 00004d 4b0000  ; 'M' = move left
key  1 000041 4b0000  ; 'A' = move left
key  1 000061 4b0000  ; 'a' = move left
scan 1 00004b 4b0000  ; Keypad '4' = move left
key  1 000104 4b0000  ; SDL Keypad '4'
;
;key  1 00002c 500000  ; ',' = move backward
key  1 000053 500000  ; 'S' = move backward
key  1 000073 500000  ; 's' = move backward
scan 1 00004c 500000  ; Keypad '5' = move backward
key  1 000105 500000  ; SDL Keypad '5'
;
;mscan 1 0051  f0 5c L  ; 'Q' = character 1 weapon / first attack
;mscan 1 0057 104 5c L  ; 'W' = character 2 weapon / first attack
;mscan 1 0045 11c 5c L  ; 'E' = character 3 weapon / first attack
mscan 1 0052 138 5c L  ; 'R' = character 4 weapon / first attack
;mscan 1 0041  f0 68 L  ; 'A' = character 1 weapon / second attack
;mscan 1 0053 104 68 L  ; 'S' = character 2 weapon / second attack
;mscan 1 0044 11c 68 L  ; 'D' = character 3 weapon / second attack
mscan 1 0046 138 68 L  ; 'F' = character 4 weapon / second attack
mscan 1 005a  f0 74 L  ; 'Z' = character 1 weapon / third attack
mscan 1 0058 104 74 L  ; 'X' = character 2 weapon / third attack
mscan 1 0043 11c 74 L  ; 'C' = character 3 weapon / third attack
mscan 1 0056 138 74 L  ; 'V' = character 4 weapon / third attack
mscan 1 0031  f0 37 L  ; '1' = first rune
mscan 1 0032  fe 37 L  ; '2' = second rune
mscan 1 0033 10a 37 L  ; '3' = third rune
mscan 1 0034 11d 37 L  ; '4' = fourth rune
mscan 1 0035 128 37 L  ; '5' = fifth rune
mscan 1 0036 136 37 L  ; '6' = sixth rune
mscan 1 00c0 136 43 L  ; '~' = backspace rune
mscan 1 0020 10d 41 L  ; space = cast spell
;mscan 1 0020 064 64 R  ; space = leader's inventory
mscan 1 0070 200 2e L  ; F1  = first magic caster
mscan 1 0071 201 2e L  ; F2  = second magic caster
mscan 1 0072 202 2e L  ; F3  = third magic caster
mscan 1 0073 203 2e L  ; F4  = forth magic caster
mscan 1 0010 114 2f L  ; Shift = No operation
mscan 1 0009 131 50 L  ; TAB = Pass (Cancel Attack)
;
key 2 000041 000041  ; 'A' -> 'A'
key 2 000061 000061  ; 'a' -> 'a'
key 2 000042 000042  ; 'B' -> 'B'
key 2 000062 000062  ; 'b' -> 'b'
key 2 000043 000043  ; 'C' -> 'C'
key 2 000063 000063  ; 'c' -> 'c'
key 2 000044 000044  ; 'D' -> 'D'
key 2 000064 000064  ; 'd' -> 'd'
key 2 000045 000045  ; 'E' -> 'E'
key 2 000065 000065  ; 'e' -> 'e'
key 2 000046 000046  ; 'F' -> 'F'
key 2 000066 000066  ; 'f' -> 'f'
key 2 000047 000047  ; 'G' -> 'G'
key 2 000067 000067  ; 'g' -> 'g'
key 2 000048 000048  ; 'H' -> 'H'
key 2 000068 000068  ; 'h' -> 'h'
key 2 000049 000049  ; 'I' -> 'I'
key 2 000069 000069  ; 'i' -> 'i'
key 2 00004a 00004a  ; 'J' -> 'J'
key 2 00006a 00006a  ; 'j' -> 'j'
key 2 00004b 00004b  ; 'K' -> 'K'
key 2 00006b 00006b  ; 'k' -> 'k'
key 2 00004c 00004c  ; 'L' -> 'L'
key 2 00006c 00006c  ; 'l' -> 'l'
key 2 00004d 00004d  ; 'M' -> 'M'
key 2 00006d 00006d  ; 'm' -> 'm'
key 2 00004e 00004e  ; 'N' -> 'N'
key 2 00006e 00006e  ; 'n' -> 'n'
key 2 00004f 00004f  ; 'O' -> 'O'
key 2 00006f 00006f  ; 'o' -> 'o'
key 2 000050 000050  ; 'P' -> 'P'
key 2 000070 000070  ; 'p' -> 'p'
key 2 000051 000051  ; 'Q' -> 'Q'
key 2 000071 000071  ; 'q' -> 'q'
key 2 000052 000052  ; 'R' -> 'R'
key 2 000072 000072  ; 'r' -> 'r'
key 2 000053 000053  ; 'S' -> 'S'
key 2 000073 000073  ; 's' -> 's'
key 2 000054 000054  ; 'T' -> 'T'
key 2 000074 000074  ; 't' -> 't'
key 2 000055 000055  ; 'U' -> 'U'
key 2 000075 000075  ; 'u' -> 'u'
key 2 000056 000056  ; 'V' -> 'V'
key 2 000076 000076  ; 'v' -> 'v'
key 2 000057 000057  ; 'W' -> 'W'
key 2 000077 000077  ; 'w' -> 'w'
key 2 000058 000058  ; 'X' -> 'X'
key 2 000078 000078  ; 'x' -> 'x'
key 2 000059 000059  ; 'Y' -> 'Y'
key 2 000079 000079  ; 'y' -> 'y'
key 2 00005a 00005a  ; 'Z' -> 'Z'
key 2 00007a 00007a  ; 'z' -> 'z'
key 2 000008 000008  ; backspace
key 2 00002e 00002e  ; period
key 2 00002c 00002c  ; comma
key 2 00003b 00003b  ; semi-colon
key 2 00003a 00003a  ; colon
key 2 00000d 00000d  ; carriage return
key 2 000020 000020  ; space
;
;

User avatar
agarules
Journeyman
Posts: 98
Joined: Thu Nov 08, 2018 2:15 am
Location: England.

Re: CSBwin custom keys

Post by agarules »

Just tried this config with Dungeon Master. There was a slight pause after I pressed w to move forward and I was thinking that it was too good to work. Then it did. Splendid, splendid.
I've kept the "old" config, just in case.
So, can I now just copy and paste this "new" config into every CSBwin game? I will do so. "Muscle memory"...ha.
Well, I thank you very much for doing this for me. Has me wondering, am I the only person who wanted their key preferences changing? I did try to find an answer online and there was nothing. So I thought that maybe someone in this community would help. You did. My attempt was very unsubtle and I probably would never have done it.
God, grant me the serenity to accept the things I cannot change,

Courage to change the things I can,

And wisdom to know the difference.
User avatar
agarules
Journeyman
Posts: 98
Joined: Thu Nov 08, 2018 2:15 am
Location: England.

Re: CSBwin custom keys

Post by agarules »

Works fine for the CSBwin games that I've downloaded...TOC 3.3, The Black Flame, Imprisoned Again and Captive.
Wonderful.
God, grant me the serenity to accept the things I cannot change,

Courage to change the things I can,

And wisdom to know the difference.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBwin custom keys

Post by Paul Stevens »

You are most welcome.
Post Reply