SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > Silent Hunter III
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 09-05-16, 07:29 AM   #1
Thoth_already_in_use
Watch
 
Join Date: Sep 2016
Posts: 15
Downloads: 96
Uploads: 0
Default Key mapper for SH3

Greetengs Capitains!

I'm unfortunate user of AZERTY keyboard, so I searched for a key manager for SH3. I found one, which comes with LSH 2015, but it was barely usable. Thus I started to create my own (c.f. screens). In the current state it reads the Commands_en.cfg, and put key-list on screen. Actually it detects the conflicts (same key for different actions and overlapping contexts).



I write in C++, with NCurses library. I would like to write it for Windows, but I never coded for it, and I have no idea how to make an Windows GUI. If there are an expert who could help me to move on Windows, I'll be grateful.

1) Is it of any use? Probably there are already an user-frendly key mapper that I'm not aware of.
2) That exactly context means, and how it defines the keys? For example the space-bar used for 'select target' in binoculars and 'fire' in gun, however both actions have same context.
Thoth_already_in_use is offline   Reply With Quote
Old 09-05-16, 10:12 AM   #2
Aktungbby
Gefallen Engel U-666
 
Aktungbby's Avatar
 
Join Date: Jul 2013
Location: On a tilted, overheated, overpopulated spinning mudball on Collision course with Andromeda Galaxy
Posts: 27,856
Downloads: 22
Uploads: 0


Default Welcome aboard!

Thoth_already_in_use! Very "thothful' of u to check in!
__________________

"Only two things are infinite; The Universe and human squirrelyness; and I'm not too sure about the Universe"

Last edited by Aktungbby; 09-05-16 at 10:36 AM.
Aktungbby is offline   Reply With Quote
Old 09-05-16, 12:23 PM   #3
THEBERBSTER
Growing Old Disgracefully
 
THEBERBSTER's Avatar
 
Join Date: Dec 2012
Location: Dibden Purlieu - Southampton
Posts: 9,605
Downloads: 1123
Uploads: 0


Default

A Warm Welcome To The Subsim Community > Thoth_already_in_use
Subsim <> How To Donate <> See The Benefits <> Support The Community
Highly Recommended SH5 > The Wolves Of Steel Mega Mod
Highly Recommended SH3 > LIVING SILENT HUNTER III EDITION 2015 Mega Mod > Full Tutorials And Much More In My Signature
Highly Recommended SH4 > Webster’s GFO (Mini Mega Mod)
THEBERBSTER is offline   Reply With Quote
Old 09-05-16, 01:46 PM   #4
akula65
A-ganger
 
Join Date: Nov 2009
Posts: 76
Downloads: 23
Uploads: 0
Default

You might consider AutoIt and AutoHotkey:

https://www.autoitscript.com/site/autoit/
https://autohotkey.com/

Both have been around for a number of years.

Good luck!
akula65 is offline   Reply With Quote
Old 09-06-16, 08:06 AM   #5
Jimbuna
Chief of the Boat
 
Jimbuna's Avatar
 
Join Date: Feb 2006
Location: 250 metres below the surface
Posts: 181,175
Downloads: 63
Uploads: 13


Default

Welcome to SubSim Kaleun
__________________
Wise men speak because they have something to say; Fools because they have to say something.
Oh my God, not again!!


GWX3.0 Download Page - Donation/instant access to GWX (Help SubSim)
Jimbuna is offline   Reply With Quote
Old 09-12-16, 04:21 AM   #6
Thoth_already_in_use
Watch
 
Join Date: Sep 2016
Posts: 15
Downloads: 96
Uploads: 0
Default

Thanks for welcommings)

Sometimes Google just hate me -- after all I found a key manager for SH3. However it works strangely -- so I will continue to make this one. Also I found Qt, which is easy to access/learn (at least at the basis laves), and I'm porting existing cote to Qt.

Few questions for spetialists:
where I can find the definitions for command name, MenuId, Page/Title and StringId?
I get StringID are defined in en_menu.txt. But for other variables, I'm not sure.

And, by the way, I'm not a real programmer, I just have a very dull fall.
Thoth_already_in_use is offline   Reply With Quote
Old 09-12-16, 11:33 PM   #7
badwolf
XO
 
Join Date: Jun 2008
Posts: 427
Downloads: 59
Uploads: 0
Default

This may help you with the MenuId

example:-
In Command_en

[Cmd10]
Name=Interior_fore_camera
Ctxt=1
MnID =0x3F020001
Key0=0x71,,"F2"
Page=0x33000000,3703

Your installation will be different to mine, due to mods. But this shows how to do it.


Copy the 0x3F020001 then open up Menu_1024_768. Then in Edit select find and paste 0x3F020001

Menu_1024_768

[G3F I34]
Name=Command room
Type=1032
ItemID=0x3F020001
ParentID=0x3F020000
Pos=0,-7,40,41
Materials=4
Display=0
Mat 0=data/menu/OLC/Shortcuts/CommandRoom.tga
Mat 1=data/menu/OLC/Shortcuts/CommandRoom.tga
Mat 2=data/menu/OLC/Shortcuts/CommandRoom.tga
Mat 3=data/menu/OLC/Shortcuts/CommandRoom.tga
MatFlags=0x21
TexFmt=0x9
Font=1
TextFlags=0x0
StatesColors=0xB0B0B0FF,0xF F,0xFFFFFFFF,0xFFFFFFFF

This is one of the commands on the slide out menu on the left side of the screen.

[G3F I23]
Name=Group shortcuts
Type=1026
ItemID=0x3F020000
ParentID=0x3F000000
Pos=137,52,570,52
Color=0xFFFFFFFF
VertSlide=-47

This is the ParentID of the group of shortcut commands - the VertSlide command is what makes it slide out from the bottom of the screen. (Note: My shortcuts are at bottom of screen. therefore it is a vertical slide = VertSlide. If it was in the normal position on the left side, it would be an horizontal slide = HorizSlide.)

Last edited by badwolf; 09-13-16 at 12:21 AM.
badwolf is offline   Reply With Quote
Reply

Tags
keymap


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.