Forum Index
SUBSIM Forum Search

The Web's #1 BBS for all submarine and naval simulations!
[ SUBSIM Review ] [ SUBSIM STORE ]
Current Forum | Archives 2002-2003 |

I'm making a keymapper...
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop
View previous topic :: View next topic  
Author Message
Kabukiman



Joined: 27 Mar 2002
Posts: 33
Location: Germany

PostPosted: Fri Apr 01, 2005 2:17 pm    Post subject: I'm making a keymapper... Reply with quote

Hi guys,

just to inform you, I'm currently working on a keymapper allowing you to change keys easier than by editing the .cfg manually. Anybody interested in an english version?

I still have a hard time trying to understand the "CText" Value in the config, so if anybody has some knowledge of the general Entries in the config-file, please share...

I need every help, every information that has already been gathered...

Right now my Tool is able to read and display the current hotkey-settings. Still much more work to do before I can save newly edited keys...

Screenshot (caution, it's pre-pre-pre-alpha stage!):
Back to top
View user's profile Send private message
Michiel de Ruyter



Joined: 21 Sep 2001
Posts: 230

PostPosted: Fri Apr 01, 2005 2:23 pm    Post subject: Reply with quote

From the commands_en.cfg

Quote:
Ctxt = command context(s) as indexes -> see [Contexts] section

[Contexts]
ContextsNb=11; max contexts nb is 16
Context0=None; default - should not be changed
Context1=Game
Context2=Pause
Context3=Spectator
Context4=Console
Context5=Museum
Context6=Effects
Context7=Final
Context8=Edit
Context9=Replay
Context10=ModalMsg


As far as I understand the CText value indicates in what context the keystroke is valid. Keying 'S' in any other mode then Game (CText=1) doesn't do anything, etc.
Back to top
View user's profile Send private message
Kabukiman



Joined: 27 Mar 2002
Posts: 33
Location: Germany

PostPosted: Fri Apr 01, 2005 2:25 pm    Post subject: Reply with quote

Ah!

You mean that a function that has not CText = 2 (Pause) in it's CText-Values will not be used while the game is paused?

That would make sense...
Back to top
View user's profile Send private message
Michiel de Ruyter



Joined: 21 Sep 2001
Posts: 230

PostPosted: Fri Apr 01, 2005 2:26 pm    Post subject: Reply with quote

Kabukiman wrote:
You mean that a function that has not CText = 2 (Pause) in it's CText-Values will not be used while the game is paused?


That is my understanding, yes.
Back to top
View user's profile Send private message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Fri Apr 01, 2005 3:27 pm    Post subject: Reply with quote

The modifier keys are important - C,c,s,R to account for. (Crew, CTRL, SHIFT, Repeat).

The way I understand it, if you use the Crew modifier (uppercase C), the command is then performed by the crew, and not by you. The effect is that efficiency then plays a role, depending on the crew member's current efficiency.

Note that when allowing a new key to be bound to a previously unbound function, not all functions will work. I've tried a lot of them and had success on maybe 50%.

Same with the strings. Binding a new string to a function may produce a log message and may not. It depends. If the function is set up to issue a log message already, i.e., the program will issue it if defined, (hydrophone Follow nearest sound contact and Normal sweep are good examples), then a log message will be issued.

-timetraveller
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Puster_9th



Joined: 26 Mar 2005
Posts: 22
Location: Luebeck, Germany

PostPosted: Fri Apr 01, 2005 3:40 pm    Post subject: Reply with quote

Concerning the modifier key "uppercase C":

For some commands, for example "Man the deckgun", you will hear a voice confirmation from your officer like "Yes Sir, manning the deck gun". When you map a key to this command without the "uppercase C" you will hear no voice confirmation. But with "uppercase C" you will hear it.

Best regards,
Puster

9th Modding-Team
Back to top
View user's profile Send private message Send e-mail
Kabukiman



Joined: 27 Mar 2002
Posts: 33
Location: Germany

PostPosted: Fri Apr 01, 2005 3:54 pm    Post subject: Reply with quote

timetraveller wrote:
The modifier keys are important - C,c,s,R to account for. (Crew, CTRL, SHIFT, Repeat).


Yeah, I already parse those modifiers (if you look closely on the Screenshot, you'll see a "Strg + Bild-Nach-Oben". This "Strg" is the "Ctrl"-Key on a german keyboard, so I am already parsing part of those flags).

Thanks for the input so far, very valuable infos!

Anyone got some info about the "R" (Repeat) Flag? Purpose?
Back to top
View user's profile Send private message
xrvjorn



Joined: 22 Mar 2005
Posts: 219
Location: Sweden

PostPosted: Fri Apr 01, 2005 4:40 pm    Post subject: Reply with quote

[quote="Kabukiman"]
timetraveller wrote:

Anyone got some info about the "R" (Repeat) Flag? Purpose?


It's used for Scope up/down (PgUp/PgDn, Insert/Delete), where you have to keep the key pressed while executing the command. The same goes for the keys used for rotating the scope and views.

BTW, what tools are you using for lexical analysis and parsing? Just curious...
Back to top
View user's profile Send private message
Michiel de Ruyter



Joined: 21 Sep 2001
Posts: 230

PostPosted: Fri Apr 01, 2005 4:51 pm    Post subject: Reply with quote

Quote:
It's used for Scope up/down (PgUp/PgDn, Insert/Delete), where you have to keep the key pressed while executing the command. The same goes for the keys used for rotating the scope and views.

<In Daffy Duck voice> AH-HAAAAA!

So, one would be able to use the set rudder command with the 'repeat' to some left- and right rudder key?

I've been looking for a solution to clicking the interface. Wanted also to set some keys to 10 and 20 degrees left and right rudder, but couldn't find the appropriate commands.

And in-harbour manouvering with just full left and right is bit heavy handed (I'm not a German tourist in vacation-sailing Friesland, after all).
Back to top
View user's profile Send private message
Kabukiman



Joined: 27 Mar 2002
Posts: 33
Location: Germany

PostPosted: Fri Apr 01, 2005 4:58 pm    Post subject: Reply with quote

xrvjorn wrote:
BTW, what tools are you using for lexical analysis and parsing? Just curious...


My brain!

No, seriously, just a simple call to sscanf.
If you look at the cfg-file, it is in fact an INI-File, which can be read out easily using GetPrivateProfileString (for example). Then simply parsing using sscanf and strchr...

Pseudo-Code:
Code:

sscanf(MyCTextString, "%x,%s,\"%s\", iScanCode, szModifierFlags, szKeyName);
if(strchr(szModifierFlags, 'c'))
{
    // it's with Ctrl-Key!
}
if(strchr(szModifierFlags, 's'))
{
    // it's with Shift-Key!
}
if(strchr(szModifierFlags, 'C'))
{
    // it's confirmed by Crew!
}
// and so on and so on...


It is as simple as that...
Back to top
View user's profile Send private message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Fri Apr 01, 2005 5:00 pm    Post subject: Reply with quote

Kabukiman wrote:
Anyone got some info about the "R" (Repeat) Flag? Purpose?


Yes, additionally, it means the key repeats itself, like holding the arrow keys down to move position, like when you type the "x" key and hold it down you get....

xxxxxxxxxxxxxxxxxxxxxx

@@@Puster-
Thanks for that info on the crew voices and the "C" modifier. I never knew that.

-timetraveller,
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wazoo



Joined: 27 Jan 2005
Posts: 247
Location: Tustin, California

PostPosted: Sat Apr 02, 2005 8:13 pm    Post subject: Re: I'm making a keymapper... Reply with quote

Kabukiman wrote:
Hi guys,

just to inform you, I'm currently working on a keymapper allowing you to change keys easier than by editing the .cfg manually. Anybody interested in an english version?



Yes... PLEASE make an English version....

Wazoo
Back to top
View user's profile Send private message
R48



Joined: 22 Nov 2002
Posts: 222

PostPosted: Sun Apr 03, 2005 5:26 pm    Post subject: Reply with quote

I'd vote for an English version also.
Back to top
View user's profile Send private message
jmr



Joined: 24 Sep 2004
Posts: 296

PostPosted: Sat Apr 09, 2005 3:57 am    Post subject: Reply with quote

Regarding the Repeat command, is there a way to adjust the rate of repeat or is that hard coded into the game?
Back to top
View user's profile Send private message
GunMod



Joined: 30 Mar 2005
Posts: 104

PostPosted: Sat Apr 09, 2005 4:35 am    Post subject: Reply with quote

Replay?

Is that something that got left out of the game?
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group