Workaround for hard-bound keys, AutoHotkey tutorial

Post » Fri Nov 27, 2015 8:29 am

Just wanted to thank you for writing all of this up for us. It fixed my issue but I hope they fix the game soon.

User avatar
Joie Perez
 
Posts: 3410
Joined: Fri Sep 15, 2006 3:25 pm

Post » Fri Nov 27, 2015 10:27 am

ESDF user on AZERY lay-out here, made a script to work around that - thanks for making this list to help me with that.

Noticed, while playing, that spacebar (Space) is hardcoded as well. It connects power objects in Workshop mode (generator, laser turret, pylon, terminal, ...), and it triggers "Execute critical" in VATS. Possibly more, if I run into anything I'll report back.

User avatar
Enny Labinjo
 
Posts: 3480
Joined: Tue Aug 01, 2006 3:04 pm

Post » Thu Nov 26, 2015 10:57 pm

Tab is also used in construction both for moving up one level in the menu and for selecting a person or storing an object.

So if you try to go up from wood structures to structures and someone wanders by, it tries to issue them a command (usually to Dogmeat, who can't do town tasks, so you get an error).

If you're near an object, it asks you if you want to store the object (and "picks it up"). You can't cancel this action, you have to choose yes or no (which cancels, but there's no one-key solution).

I'm not suggesting a flogging, but a little public humiliation may be in order. Also, fixing the damned menus.

User avatar
Kate Schofield
 
Posts: 3556
Joined: Mon Sep 18, 2006 11:58 am

Post » Fri Nov 27, 2015 2:27 pm

Here is my script. First block is to rebind the forced controls and the second is to bind things to what I want to use. I didn't change any default controls other than the mouse and then to move some of the quick keys to something else. I converted their numpad controls to use TYU,GHJ,BNM and the I as num0. Arrow keys were moved to the 6 block of INS,HOME,END,Etc.

Spoiler
+Break::
Suspend
Pause,,1
return

y::Numpad8
return
n::Numpad2
return
g::Numpad4
return
j::Numpad6
return
i::Numpad0
return
h::Numpad5
return
t::Numpad7
return
u::Numpad9
return
b::Numpad1
return
m::Numpad3
return
Home::Up
return
End::Down
return
Delete::Left
return
PgDn::Right
return
Enter::NumpadEnter
return

Numpad8::w
return
Numpad2::s
return
Numpad4::a
return
Numpad6:: d
return
Numpad0::r
return
NumpadDiv::q
return
Numpad5::e
return
Up::Tab
return
Down::MButton
return
Right::CapsLock
return
NumpadEnter::Space
return

User avatar
Gen Daley
 
Posts: 3315
Joined: Sat Jul 08, 2006 3:36 pm

Post » Fri Nov 27, 2015 9:23 am

np mate, managing this is entertaining enough for me, I'll have some really cool stuff posted here soon too

I'll add that on. I actually don't have any of the VATS commands on here yet, but I didn't realize space was hardbound to do anything. I've heard some people say WASD is hardbound at some point in the game for navigation of something as well

Yeah, I'm going to figure out a way to safely consolidate some of the menu keys eventually. Thanks for letting me know about this.

I take it you're using a 2-button mouse. Also remember that T is a hardbound action so you're going to eventually need to have that key unmapped.

User avatar
Christine Pane
 
Posts: 3306
Joined: Mon Apr 23, 2007 2:14 am

Post » Fri Nov 27, 2015 5:20 am

I am using a 5 button mouse just not using the the side buttons

left is fire

middle is sneak

right is jump

wheel is zoom to 3rd person

the 2 other buttons I don't use yet although I'll probably make the thumb button aim/block

What does "T" actually do in the game?

User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Fri Nov 27, 2015 4:12 am

I just got a left-handed script compiled if you are looking for one quick. It assumes a 3-button, though.

User avatar
Kira! :)))
 
Posts: 3496
Joined: Fri Mar 02, 2007 1:07 pm

Post » Fri Nov 27, 2015 12:26 am

Alright I have a pre-compiled binary file ready to go, for those of you who are comfortable running it: http://s000.tinyupload.com/index.php?file_id=00515017459591477951

Since the file is binary it does not require AutoHotkey to work (on either Win or Mac). Just download it, save it somewhere handy, and run it whenever you're about to boot up Fallout 4. Some issues have been reported running it without administrative privileges.

Can't remember which keys are which? Pull up your Steam overlay in-game (if in online mode) and have this web browser tab handy: http://i612.photobucket.com/albums/tt201/fatesdecision/Lefties-3buttons_zpsltfhvdvx.png

Shift + Pause will toggle the program off.

If you're curious, (or don't want to risk running a foreign binary file) below is the script that was compiled:

+Break::	Suspend	Pause,,1returne::Upd::Downf::Rights::LeftSpace::eHome::1End::2PgDn::EscUp::7Down::9Left::8Right::0Numpad0::TabNumpad1::rNumpad2::cNumpad3::=Numpad4::aNumpad5::sNumpad6::dNumpad7::eNumpad8::wNumpad9::qNumpadDot::-NumpadDiv::zNumpadMult::xNumpadAdd::tNumpadSub::SpaceNumpadEnter::Tab
User avatar
Cathrine Jack
 
Posts: 3329
Joined: Sat Dec 02, 2006 1:29 am

Post » Thu Nov 26, 2015 10:17 pm

i remapped T and all is well for me using the script I posted. No weirdness where a key starts doing 2 things. commanding dog or having conversations works normally using the new keys.

User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm

Post » Fri Nov 27, 2015 1:30 pm

True... I bought the PC verssoin becauseI want my full PC key fweedom! there is no reason for us NOT to have such feature!~ please Bethesda, Fix this! the game is lacking the feature of a PC game!~ this isn't a console port!~

Oh please give us more hot keys for weapons/equipments(like armors)/consumables! like a Shift function of some sort, example: 1-9 numkeys are weapons, and hold "insert your bind for armor/clothing" + 1-9 on num pad to change hot keys of wares, "insert your bind for consumables" + 1-9 on numpad for quick bite/shot/read thinggies, maybe one for bullets? nades? kinda like project neveda?

User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Fri Nov 27, 2015 1:01 am

Awesome iFailed, awesome!

I've got all the keys remapped to my saner/insaner preferences but there's one minor glitch I'm unable to resolve.

Cannot holster any drawn weapon.

Reload is mapped as:

;Reload
NumpadMult::r
return

I've tried remapping to a few other keys but to no avail.

Am I correct in assuming that there's a different function to detect the length of time a key is pressed or is "Holster" not available for remapping?

tia

z

User avatar
Sandeep Khatkar
 
Posts: 3364
Joined: Wed Jul 18, 2007 11:02 am

Post » Fri Nov 27, 2015 3:40 am

You don't happen to have numlock on when you're doing it, do you? I'm assuming you've been able to use the key for reloading but not for holstering? I changed my lefty sample script to NumpadMult for reload and I can sheathe weapons with r bound to it no problem. When you say that you can't remap to any other keys do you mean that you've tried using other buttons to holster as well? Your keyboard may have a setting that is causing it to iterate outputs rather than hold them down? I suppose the answer to that question would be based on whether or not you can holster a key that you haven't remapped with AHK

User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm

Post » Fri Nov 27, 2015 7:51 am

Thank you for doing this, iFailed.

User avatar
Invasion's
 
Posts: 3546
Joined: Fri Aug 18, 2006 6:09 pm

Post » Fri Nov 27, 2015 9:38 am

Can somebody verify that the weapon wheel is working for them?

User avatar
Alexis Acevedo
 
Posts: 3330
Joined: Sat Oct 27, 2007 8:58 pm

Post » Fri Nov 27, 2015 3:01 am

I had this problem remapped to \, *but* when I held it down long enough it did work. Simple remap, so this appears to be an inconsistency.

Mind you, I remapped Q to backspace and VATS only works inside town construction zones for me (but it works with both keys). That makes zero sense. EXCEPT that the fact that Bethesda hardcoded different keys into different mens may mean that a SWF menu is intercepting keys in the construction areas and interpreting them *one* way, and the executable is handling those keys in "free" areas and interpreting them in a different way.

Neither the mapped or unmapped key works with AHK running outside the construction zone.

User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Fri Nov 27, 2015 2:41 pm

T also equips items on an NPC during a trade (like a settler, so you can force them to use items or armor you gave them). I believe it also deposits all junk in a workshop-style container, the "R to transfer" option at a workbench.

User avatar
BlackaneseB
 
Posts: 3431
Joined: Sat Sep 23, 2006 1:21 am

Post » Fri Nov 27, 2015 6:39 am

I didn't realize that construction zone changed anything other than the POV softbind. I'll have to look into this tomorrow. I think this is because free areas do not care about your POV key being held down. The entire binding map may rotate.

Thanks again. I haven't got past Dogmeat, much less to a barter screen.

User avatar
roxxii lenaghan
 
Posts: 3388
Joined: Wed Jul 05, 2006 11:53 am

Post » Fri Nov 27, 2015 12:56 pm

@iFailed

Nice work with your tutorial. You might want to add this:

If you add

#ifWinActive, ahk_class Fallout4

above the definitions, everything that follows ONLY affects Fallout 4. If you switch to another program or exit the game, the definitions are automatically inactive.

You no longer need to stop the script with your +::break... definition.

The #if... directive is effective until another #if... directive or the end of the script. I have an AutoHotKey script permanently running and use #if... directives to have specific definitions for a large number of programs, like hotkeys for Windows Explorer, other applications and games like Fallout 4.

I also recommend adding this as the next line for Fallout 4:

#MaxHotkeysPerInterval 2000

Without it, AutoHotKey occasionally popped up a warning about too many repeated keys pressed. Might be usefull for other games too but Fallout 4 is the first one where I needed this.

Regarding Build-Mode, I don't know if it has been mentioned, but you can use your movement keys to navigate the Build-Menu by pressing shift. This still works both for keys remapped in-game as well as through AutoHotKey. I use AutoHotKey to remap movement to the cursor keys and with shift+cursor keys I can easily navigate the Build-Menu.

Unfortunately that doesn't work with the dialog options, but with AutoHotKey you can also simply swap keys:

Up::wDown::sLeft::aRight::d w::Ups::Downa::Leftd::Right

With that the cursor keys work for walking, menu navigation and Shift+Cursor keys navigate the Build-menu while WASD can be used to select the dialog choices. Of course you can also use the mouse to click on them.

I also saw a couple of script samples in this thread having code like this:

key::keyreturn

This works but it's unnecessary. You only need 'return' on multi-line definitions like this:

key::    code    codereturn

As long as you have just one line, you don't need a 'return' in the next line.

User avatar
Erin S
 
Posts: 3416
Joined: Sat Jul 29, 2006 2:06 pm

Post » Fri Nov 27, 2015 7:36 am

I had something similar of a problem when I was tinkering with the weapon wheel script. If you look at this template in place of an a::b map

a::    Sleep, x    Send {b Down}    Sleep, y    Send {b Up}return

tweak x and y starting with values around 30 and see if you can find something that works more consistently.

User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm

Post » Fri Nov 27, 2015 3:07 am

I'll add that into the FAQ section. I don't use the #ifWinActive because I've found it to not work correctly with some games, and I debug mostly with notepad so I forget to stick it back on. Without a way to suspend the script you run into the problem of not being able to name your items in F4 without minimizing and ending. I think it would also interfere with the Steam browser but I'm not sure.

#MaxHotkeysPerInterval is not one that I was aware of, but I've generally found the popups to be useful because for me it always means something is wrong.

The big problem I think that is being had is that I can't find a way to disable keys from sending, even with x::return some keys will still play

User avatar
Ronald
 
Posts: 3319
Joined: Sun Aug 05, 2007 12:16 am

Post » Thu Nov 26, 2015 10:56 pm

T also repairs power armor pieces in the PA-specific crafting menu.

User avatar
Miranda Taylor
 
Posts: 3406
Joined: Sat Feb 24, 2007 3:39 pm

Post » Fri Nov 27, 2015 7:51 am

I never had a problem with #ifWinActive. If games didn't react properly it was usually rather an issue with DirectX and the send method used by AHK.
Either way, it's working fine with Fallout 4.

The naming of Items is a good point, though. I never did that (yet), so problems with that and keymappings never occurred to me.
I'll have to test my AHK script with that. As I play with cursor keys and the keys surrounding them, it might not be a problem.

I just wish the controlmap.txt they used in Skyrim was still available for Fallout 4. Harder to edit than an AHK script, but it was all in-game so there where no issues like that at all.

Might be good for testing but if AHK pulls you out of a fight because you pressed too many keys at once it's rather annoying. ;)

User avatar
Alexander Horton
 
Posts: 3318
Joined: Thu Oct 11, 2007 9:19 pm

Post » Fri Nov 27, 2015 11:09 am

C, while in map view, toggles between your current map mode, or "Show supply routes" which shows the supply routes you have set up between your settlements.

:Edit: Can also confirm that script needs to be suspended to use Steam Overlay's browser/chat windows. So many times I've sent garbled messages while quickly responding...

:Edit2: T also skips the video that plays first when you start a new game.

User avatar
LADONA
 
Posts: 3290
Joined: Wed Aug 15, 2007 3:52 am

Post » Fri Nov 27, 2015 9:18 am

I've tried checking NumLock but there's no effect.

But before using your AutoHotKey solution I tried using both G-Hotkey and SharpKeys and I'm wondering if I borked something up somewhere in the key registry even though I completely cleared their settings and uninstalled them.

Anyway, it's a fairly minor glitch I can live with until there's a more comprehensive solution available.

Again, thanks for your help!

k

User avatar
Emily Jones
 
Posts: 3425
Joined: Mon Jul 17, 2006 3:33 pm

Post » Fri Nov 27, 2015 8:46 am

Got all of yours up there. Double thanks

User avatar
sally R
 
Posts: 3503
Joined: Mon Sep 25, 2006 10:34 pm

PreviousNext

Return to Fallout 4