• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community Discovery General Discovery RP 24/7 General Discussions
« Previous 1 … 48 49 50 51 52 … 778 Next »
multiple keymaps - possible ?

Server Time (24h)

Players Online

Active Events - Scoreboard

Latest activity

Pages (4): « Previous 1 2 3 4
multiple keymaps - possible ?
Offline Stabby_Dave
08-17-2017, 01:15 AM,
#31
Member
Posts: 298
Threads: 83
Joined: Jan 2016

That will switch the keys, when freelancer is the active window, but I'm after a toggle, so that I can change them back and forth when I want. Your script won't do that.

I need to be able to switch between the two on a keypress, and I can't get that working.

I think my script is close, but obviously not right.

Heeeeeeeeeeelp. Wink

A database of helpful information
Reply  
Offline DannyDelicious
08-17-2017, 01:49 AM, (This post was last modified: 08-17-2017, 01:50 AM by DannyDelicious.)
#32
Banned
Posts: 177
Threads: 6
Joined: Apr 2017

F12::
Toggle := !Toggle
If Toggle
w::UP
a::Left
s:Big Grinown
d::Right
else

return









Something like that idk don't remember autohotkey very well

User was banned for: https://discoverygc.com/forums/showthrea...tid=191789
Time left: (Permanent)
Reply  
Offline Stabby_Dave
08-17-2017, 03:25 AM,
#33
Member
Posts: 298
Threads: 83
Joined: Jan 2016

Cheers.

I'll have a go playing with that.

Smile

A database of helpful information
Reply  
Offline ronillon
08-17-2017, 11:14 AM,
#34
Copper Storage Depot
Posts: 563
Threads: 19
Joined: Oct 2012

(08-17-2017, 01:15 AM)maddog_dave Wrote: That will switch the keys, when freelancer is the active window, but I'm after a toggle, so that I can change them back and forth when I want. Your script won't do that.

I need to be able to switch between the two on a keypress, and I can't get that working.

I think my script is close, but obviously not right.

Heeeeeeeeeeelp. Wink

Well, ofcourse not, that was not my intention at that point. The previous script switches the keys just fine and it works for steering in game.

The trouble is, that althought what you want seems rather simple, it is in fact not that easy to achieve. Or at least, I have not figured the way yet.

The following AHK script does switch WASD and Arrow Keys in Freelancer and can be toggled On/Off by F12.
The trouble here is, that although it does work correctly when in the chatbox, the game does not recognize the keys for ship movement. Obviously, this will need some more work.
[+]Spoiler
Code:
#IfWinActive ahk_class Freelancer
{
; Disable Hotkeys on Autohotkey start.
Hotkey, w, Off
Hotkey, a, Off
Hotkey, s, Off
Hotkey, d, Off
Hotkey, Up, Off
Hotkey, Left, Off
Hotkey, Down, Off
Hotkey, Right, Off

; Toggles Hotkey On/Off
F12::
Hotkey, w, Toggle
Hotkey, a, Toggle
Hotkey, s, Toggle
Hotkey, d, Toggle
Hotkey, Up, Toggle
Hotkey, Left, Toggle
Hotkey, Down, Toggle
Hotkey, Right, Toggle
return


; Hotkey configuration
$w::
Send {Up}
return

$a::
Send {Left}
return

$s::
Send {Down}
return

$d::
Send {Right}
return

$Up::
Send {w}
return

$Left::
Send {a}
return

$Down::
Send {s}
return

$Right::
Send {d}
return
}





[+]Signature:
►BattleZones
►Ore Mining
►Sci Data Anomaly "Mining"
►Sci Data Rewards
►POB
►POB Rules
►Bretonia ►Gallia ►Kusari ►Liberty ►Rheinland | ►Model/Name/Move
►MultiMonitor Setup - noBorderWindow
►BBCode
Reply  
Offline Laz
08-17-2017, 12:12 PM,
#35
(Sorta) Retired Code Monkey
Posts: 1,905
Threads: 106
Joined: Jan 2014

To give a little information on this from what I know.

Having different keymaps is impossible without the use of third party tools as mentioned prior. There is one way it would work but it would require a dev patch and an update to the launcher if I'm not mistaken. Freelancer by default loads all saves and pref files from C:\Users\X\Documents\My Games\Freelancer. It is possible to hijack common.dll to load them from the install dir meaning you could have a "cap" install and a "snub" install each one with a different control set.

By using the following code the devs could change it to allow such.

Offset 0A2FB1: Change 56 6A 00 6A 00 68 05 80 to C7 06 2E 2E 00 00 EB 0E
Offset 0A300A: Change 21 to 0C
Offset 0A3018: Change 13 to 7C
Offset 0A30BE: Change 56 6A 00 6A 00 68 05 80 to C7 06 2E 2E 00 00 EB 0E
Offset 142690: Change ["My Game"] to "Saves" 00

If devs did that it would load the files from the install directory. This would also move screenshots there as well. Two folders would appear, "Saves" and "Shots". Shots would contain screenshots when you PrintScreen and saves would contain everything else like multiplayer save data or single player saves (including restart.fl which would remove the cross mod crash).

As said before, this means nothing unless the devs add this, which I highly doubt they'd do.

Reply  
Offline Laz
08-17-2017, 12:12 PM, (This post was last modified: 08-17-2017, 12:12 PM by Laz.)
#36
(Sorta) Retired Code Monkey
Posts: 1,905
Threads: 106
Joined: Jan 2014

To give a little information on this from what I know.

Having different keymaps is impossible without the use of third party tools as mentioned prior. There is one way it would work but it would require a dev patch and an update to the launcher if I'm not mistaken. Freelancer by default loads all saves and pref files from C:\Users\X\Documents\My Games\Freelancer. It is possible to hijack common.dll to load them from the install dir meaning you could have a "cap" install and a "snub" install each one with a different control set.

By using the following code the devs could change it to allow such.

Offset 0A2FB1: Change 56 6A 00 6A 00 68 05 80 to C7 06 2E 2E 00 00 EB 0E
Offset 0A300A: Change 21 to 0C
Offset 0A3018: Change 13 to 7C
Offset 0A30BE: Change 56 6A 00 6A 00 68 05 80 to C7 06 2E 2E 00 00 EB 0E
Offset 142690: Change "My Game" to "Saves" 00

If devs did that it would load the files from the install directory. This would also move screenshots there as well. Two folders would appear, "Saves" and "Shots". Shots would contain screenshots when you PrintScreen and saves would contain everything else like multiplayer save data or single player saves (including restart.fl which would remove the cross mod crash).

As said before, this means nothing unless the devs add this, which I highly doubt they'd do.

Reply  
Offline ronillon
08-17-2017, 10:28 PM, (This post was last modified: 08-17-2017, 11:19 PM by ronillon. Edit Reason: Script Comments )
#37
Copper Storage Depot
Posts: 563
Threads: 19
Joined: Oct 2012

This version works for me. Try it out.
The toggle button needs to be pressed twice, before it starts working properly. No idea why.
But you can use AutoHotkey for other purposes as well.
[+]Code inside:
Code:
; Changes the WASD keys to ARROW keys. Press "Pause" to toggle this behavior On/Off.

; Activate KeyboardHook
#InstallKeybdHook

; Make the following only work when Freelancer window is active.
#IfWinActive ahk_class Freelancer

; TOGGLE TOGGLE TOGGLE TOGGLE TOGGLE TOGGLE TOG
SwitchKeys :="0"

Pause::
If SwitchKeys = 0
SwitchKeys :="1"
Else
SwitchKeys :="0"
Return
; TOGGLE TOGGLE TOGGLE TOGGLE TOGGLE TOGGLE TOG



; WASD WASD WASD WASD WASD WASD WASD WASD WASD

; WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
$w::
If SwitchKeys = 1
    SendInput {Up down}
Else
    SendInput {w down}
Return

$w up::
If SwitchKeys = 1
    SendInput {Up up}
Else
    SendInput {w up}
Return
; WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

; AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
$a::
If SwitchKeys = 1
    SendInput {Left down}
Else
    SendInput {a down}
Return

$a up::
If SwitchKeys = 1
    SendInput {Left up}
Else
    SendInput {a up}
Return
; AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

; SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
$s::
If SwitchKeys = 1
    SendInput {Down down}
Else
    SendInput {s down}
Return

$s up::
If SwitchKeys = 1
    SendInput {Down up}
Else
    SendInput {s up}
Return
; SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

; DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
$d::
If SwitchKeys = 1
    SendInput {Right down}
Else
    SendInput {d down}
Return

$d up::
If SwitchKeys = 1
    SendInput {Right up}
Else
    SendInput {d up}
Return
; DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

; WASD WASD WASD WASD WASD WASD WASD WASD WASD




; UP,LEFT,DOWN,RIGHT UP,LEFT,DOWN,RIGHT UP,LEFT

; UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP
$up::
If SwitchKeys = 1
    SendInput {w down}
Else
    SendInput {Up down}
Return

$up up::
If SwitchKeys = 1
    SendInput {w up}
Else
    SendInput {Up up}    
Return
; UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP

; LEFT LEFT LEFT LEFT LEFT LEFT LEFT LEFT LEFT
$Left::
If SwitchKeys = 1
    SendInput {a down}
Else
    SendInput {Left down}
Return

$Left up::
If SwitchKeys = 1
    SendInput {a up}
Else
    SendInput {Left up}
Return
; LEFT LEFT LEFT LEFT LEFT LEFT LEFT LEFT LEFT

; DOWN DOWN DOWN DOWN DOWN DOWN DOWN DOWN DOWN
$Down::
If SwitchKeys = 1
    SendInput {s down}
Else
    SendInput {Down down}
Return

$Down up::
If SwitchKeys = 1
    SendInput {s up}
Else
    SendInput {Down up}
Return
; DOWN DOWN DOWN DOWN DOWN DOWN DOWN DOWN DOWN

; RIGHT RIGHT RIGHT RIGHT RIGHT RIGHT RIGHT RIG
$Right::
If SwitchKeys = 1
    SendInput {d down}
Else
    SendInput {Right down}
Return

$Right up::
If SwitchKeys = 1
    SendInput {d up}
Else
    SendInput {Right up}
Return
; RIGHT RIGHT RIGHT RIGHT RIGHT RIGHT RIGHT RIG

; UP,LEFT,DOWN,RIGHT UP,LEFT,DOWN,RIGHT UP,LEFT

#IfWinActive

; Changes the WASD keys to ARROW keys. Press "Pause" to toggle this behavior On/Off.


This is simple version (already mentioned in previous post) with Pause as toggle.
The downside is, that since it suspends all hotkeys, you cannot use AutoHotkey for other hotkeys.
[+]Code inside:
Code:
; Changes the WASD keys to ARROW keys. Press "Pause" to toggle this behavior On/Off.

; Activate KeyboardHook
#InstallKeybdHook

; Make the following only work when Freelancer window is active.
#IfWinActive ahk_class Freelancer

; Suspend key switch, so the default mode is normal layout.
Suspend

; Toggle key switch On/Off,
Pause::Suspend, Toggle

; Set which keys should be switched.
$w::Up
$Up::w
$a::Left
$Left::a
$s::Down
$Down::s
$d::Right
$Right::d
#IfWinNotActive
; Changes the WASD keys to ARROW keys. Press "Pause" to toggle this behavior On/Off.





[+]Signature:
►BattleZones
►Ore Mining
►Sci Data Anomaly "Mining"
►Sci Data Rewards
►POB
►POB Rules
►Bretonia ►Gallia ►Kusari ►Liberty ►Rheinland | ►Model/Name/Move
►MultiMonitor Setup - noBorderWindow
►BBCode
Reply  
Offline Stabby_Dave
08-18-2017, 02:13 PM,
#38
Member
Posts: 298
Threads: 83
Joined: Jan 2016

@ronillon :

That code works a treat. For some reason, I don't need to press it twice as you do. Don't know why, don't care why.

Many, many thanks, man. Exactly what I needed.

A database of helpful information
Reply  
Pages (4): « Previous 1 2 3 4


  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2025 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode