0 of 0

File information

Last updated

Original upload

Created by

Showcase

Uploaded by

Showcase10

Virus scan

Safe to use

Tags for this mod

29 comments

  1. Nilt
    Nilt
    • supporter
    • 3 kudos
    Edit 3: I am now using an entirely different option, which I have detailed in a reply to this comment.  I could have worked around the issues with using Alt by binding that to another key in game and changing the script as appropriate, the option to have it just toggle using the in-game binding is simpler for me and I don't have to remember to run the script, either.

    Original post:
    I was talking to a friend who mentioned this mod/script to me.  They don't like having to run as admin, which was odd to me since my own that I made doesn't need that.  Due to some physical limits on my hands, I usually have something such as this for games where holding a key won't work well for me.  Anyhow, since mine doesn't need to be run as admin, I figured I'd post it here and maybe you can update the script with it.

    This is just a little finicky for me.  I have to tap Alt fairly quickly or it doesn't seem to stick.  Not sure if this is universal or not.

    Pay attention to whether you're running the game with Vulkan or Dx11 and modify the script as stated in the scripts.  This prevents this particular AHK script from operating in any window other than the game itself.

    #NoEnv
    SendMode Input
    DetectHiddenWindows, On

    ; The lines below will restrict the script only to the game itself.
    ; If running Vulkan, uncomment the first of the 2 lines by removing the semicolon (;).
    ; Put one at the start of the dx11 line below it to block that one out.

    ;#IfWinActive, ahk_exe bg3.exe
    #IfWinActive, ahk_exe bg3_dx11.exe

    $Alt::
    If (AltState := !AltState)
    Send {Alt Down}
    Else
    Send {Alt up}
    Return

    ; This next section prevents the Alt toggle from sending Alt+Tab in game.
    ; If you don't want this, comment them out with a semicolon (;) before each
    ; line or you can also simply delete the lines.
    !Tab::
    Send {Tab}
    Return


    If you want it for Tab, use this one.  I haven't tested this but see no reason why it won't work.  For me, Tab just pops up the full party inventory screen but that might just be because I played with the keybinds so I included it here as well since it's part of the main set of files.

    #NoEnv
    SendMode Input
    DetectHiddenWindows, On

    ; The lines below will restrict the script only to the game itself.
    ; If running Vulkan, uncomment the first of the 2 lines by removing the semicolon (;).
    ; Put one at the start of the dx11 line below it to block that one out.

    ;#IfWinActive, ahk_exe bg3.exe
    #IfWinActive, ahk_exe bg3_dx11.exe

    $Tab::
    If (TabState := !TabState)
    Send {Tab Down}
    Else
    Send {Tab up}
    Return

    Edited to add: I should note that having Alt toggled on prevents me from using Right Click on things in the game so you need to toggle it off for that to function properly.  There's likely a way to work around this but I haven't found it worth investigating.

    Edit 2: Ha, was talking to my friend and they said the right click thing was due to the bind for Ping being Alt+RightClick.  Sure enough, rebinding that to Ctrl+Alt+RightClick made that issue go away.  Handy, that!
    1. rukiss
      rukiss
      • member
      • 0 kudos
      Thank you. It works perfectly. you are a genius
    2. Nilt
      Nilt
      • supporter
      • 3 kudos
      You bet, @rukiss.  Hardly a genius, though.  I've just been using AHK for quite a while now and know what tends to work is all.  The genius is all due to others whose knowledge I benefited from over the years.  As an aside, there's also a UI mod that says it can do the same thing.

      Since this script still has some minor issues when I have Alt toggled to be held, mostly surrounding Alt+Escape, I'm going to be trying that and hoping it does the trick.  It's possible to have AHK not cause this issue but it gets a lot trickier since that's a hard coded thing in Windows and I prefer not to bother with that sort of thing if I can avoid it.

      There's another mod that allows Achievements to continue to function is using mods, so that'll still be functional, too.
    3. Showcase10
      Showcase10
      • premium
      • 1 kudos
      nice :)
    4. Nilt
      Nilt
      • supporter
      • 3 kudos
      Turns out the UI mod doesn't currently consistently make work for toggling tooltips so I'm now using this manual process below, cobbled together from the comments on the mod Toggle Tooltips mod by shalzuth.  The description of the mod is confusing, however, since it says you have to use a manual process but they have actually uploaded a .pak version.

      I've tested both and they each work flawlessly for me.  Which you prefer is just a matter of personal choice.  I installed the .pak version using the Baldur's Gate Mod Manager and that was fine, though slightly confusing since I didn't need to add it to the load order on the left of the application.  If you want to use the .pak version and care about still getting Achievements, use the Achievement Enabler mod as well.

      Manual version that I am now using:

      • Go to the game's install path.  (Not the folder in %localappdata%!)  This path will vary somewhat but since I am using the default Steam install it is here for me:
        C:\Program Files (x86)\Steam\steamapps\common\Baldurs Gate 3\
      • Create this folder in that install path: "\Data\Public\Game\GUI\Widgets\" in the game install path.    Some of these won't exist.  Just make new folders anywhere that is the case.
      • Right click this link and save it to the new folder you just made.
        Choose the option to "Save Page As" or "Save Link As".  This varies depending on your browser of choice.
      • Save the file as WorldTooltips.xaml in the folder created in Step 1.

      Edited for a typo.
    5. taosk8r
      taosk8r
      • member
      • 0 kudos
      Anyone know of anything that is currently effective? IUI conflicts with another mod, so I cannot use it. :(
    6. Animositisomina
      Animositisomina
      • supporter
      • 19 kudos
      @Nilt Thank you for this post. I've tried a dozen other solutions and none of them worked. Yours, however, works perfectly. +1 Kudos to you.
    7. PontoffelPock
      PontoffelPock
      • member
      • 0 kudos
      This... sometimes works? But it will just deactivate on it's own without any input at times.
  2. Sabberblazer
    Sabberblazer
    • supporter
    • 3 kudos
    For anyone that has found this thread in hopes for an AHK (AutoHotKey) solution, look no further! I took great inspiration from Showcase10 in this mod and found a previous users whyHESITATE's formula in Toggle Tooltips. I fixed it up, as there was some syntax errors, and made it work with the Left Alt key, as there was functionally no difference when binding it to a different key, so I removed that step.
    This code block is for AHK v2.0:
    #HotIf WinActive("Baldur's Gate 3")
    LAlt::{
    send "{f14 up}"
    send "{f14 down}"
    return
    }
    +LAlt::{
    send "{f14 up}"
    return
    }
    #HotIf

    and AHK v1.1(deprecated):
    #IfWinActive, Baldur's Gate 
    LAlt::{
    send "{f14 up}"
    send "{f14 down}"
    return
    }
    +LAlt::{
    send "{f14 up}"
    return
    }
    #IfWinActive

    Enjoy!
    1. CJCon
      CJCon
      • member
      • 0 kudos
      Thank you for the help! ^ ^
    2. bbwi
      bbwi
      • member
      • 7 kudos
      I get this error with ahk 2
      Error: This line does not contain a recognized action.
      Text:    #HotIf WinActive("Baldur's Gate 3")
      Line: 1
  3. TheInvoker
    TheInvoker
    • member
    • 1 kudos
    i don't understand what the script does
    i already enlight things with alt (i moved to Q but ok..)

    and "you're" is "your"?
    1. Showcase10
      Showcase10
      • premium
      • 1 kudos
      It toggles the alt or tab keyboard button (on or off )
  4. armorvil
    armorvil
    • supporter
    • 2 kudos
    is there a controller version anywhere?
    1. Showcase10
      Showcase10
      • premium
      • 1 kudos
      try downloading controller companion on steam maybe u can get it to work from there
  5. Revanbc
    Revanbc
    • premium
    • 2 kudos
    Thank you, I'm using the Highlight Everything mod but I seem to have issues rebinding the ALT key when using it.  My thumb was getting cramped using WASD and holding ALT all the time.  Thank again.
  6. nokturnihs
    nokturnihs
    • supporter
    • 10 kudos
    Hey @Showcase10 - great job for working to address this! Although this sadly seems to have similar functionality in the ImprovedUI release this is still a great option for people who don't wanna play with mods but get tired of punishing their ALT key.

    Here's some suggestions though for future iterations if you're interested, hope they help and thanks again for putting it out there!
    Spoiler:  
    Show

    so to have the AHK script automatically launch BG3 (Steam - not GOG) - No idea how GoG launches stuff....
    add: run, steam://rungameid/1086940If you wish to have a script like this kill itself you could use something like this (Scraped from my Path of Exiles Script for flask pianos):
    ; PROCESS MONITORS
    process_watcher:
    {
    Process, Exist,PathOfExileSteam.exe
    if ErrorLevel = 0
    {
    sleep 100
    byemsg=WITCHKEYS by Nokturnihs`nExiting....`n`nBYE BYE!!!
    Notifier(byemsg,12)
    Sleep, 3000 ; wait 4 seconds
    progress, off
    Exitapp
    }
    SetTimer process_watcher, 500
    Return
    }
    TheWaiter(name)
    {
    Process, Exist,%name%
    if ErrorLevel = 0
    {
    process,wait,PathOfExileSteam.exe ;_x64Steam
    ;tooltip % "Process Running" (ErrorLevel ?)
    ;settimer,tooltipoff,1000 ;set a timer for 1 second to clear the tooltip
    SetTimer process_watcher, 500
    }
    Return ErrorLevel
    }
    runchecker:
    {
    if POErunning=0
    {
    Thewaiter("PathOfExileSteam.exe")
    POErunning=Thewaiter("PathOfExileSteam.exe")
    }
    if Thewaiter("PathOfExile.exe") !=0
    {
    POErunning=Thewaiter("PathOfExileSteam.exe")
    SetTimer process_watcher, 500
    }
    else
    {
    SetTimer process_watcher, 500
    }
    }
    return

    NOTE: You'd need to change PathOfExileSteam.exe to bg3.exe or bg3_dx11.exe to make it monitor Baldur's Gate. Alternatively you could edit the runchecker function to read just the "bg3" prefix and cover both but that's gonna take editing I'm just not willing to do for a comment. 

    You'd call these functions before your hotkey implementation with something like:
    POErunning=0
    gosub runchecker

    Just for funzies this is the notifier function: 
    Notifier(MESSAGE,FSZ)
    {
    progress, b1 zh0 fm%FSZ% ctFFFFFF WM100 cw000000 x5 y20,,%MESSAGE%,Notifier,Arial
    WinSet, AlwaysOnTop,,Notifier
    WinSet, Redraw,,Notifier
    return
    }
    And I like to use a visible toggle to show when somethings off or on (Doesn't seem to work in anything fullscreen mode but windowed or borderless typically works well most the time)
    ]::
    suspend
    {
    if (MasterToggle=0)
    {
    MasterToggle=1
    PauseMSG=WITCHKEYS PAUSED
    Notifier(PauseMSG,9)
    }
    else
    {
    gosub Readfiles
    MasterToggle=0
    Unpausemsg=UNPAUSED - %Configname%
    Notifier(Unpausemsg,9)
    sleep 1500
    progress,off
    }
    }
    return


    I also use the Notify function to show a splash screen with keybinds and stuff then say goodbye when I leave - something like this:
    Mainmsg=`nWITCHKEYS`nBy Nokturnihs`n`nVersion 2.0`n`n____________________________________`nHOTKEYS`n`n%HotMode1%: %Hot1%`n%HotMode2%: %Hot2%`n%HotMode3%: %Hot3%`n%HotMode4%: %Hot4%`n____________________________________`nTOOLS`n`nENTER: Suspend`nNumpad *: LabCompass`n`n____________________________________`n%Configname%`n
    run, %Spotify%
    run, %POE_Runtime%
    Notifier(Mainmsg,11)


    So I realize this is a long and nerdy post but either way - Thanks bud! You ROCK and thank you for helping out the community with your contributions!
  7. wanderingHP
    wanderingHP
    • supporter
    • 1 kudos
    This does not seem to work "in game."
    It definitely applies a hold affect to thealt key (tested in browser) but when I'm in game and press the alt key, the items just flash for a second. 
    It still acts like a hold key, regardless of the autokey effect. 
    1. Showcase10
      Showcase10
      • premium
      • 1 kudos
      Be sure to run it as admin (right click the script for option) it also doesn't work for me if i don't run it as admin
    2. wanderingHP
      wanderingHP
      • supporter
      • 1 kudos
      Thought I had autohotkey set to run as admin but appparently I did not. 
      This "fixed" it.
      Thanks!
  8. Tandonium
    Tandonium
    • supporter
    • 1 kudos
    Thank you!
    Followed instructions and it worked as described.
  9. Dorsum
    Dorsum
    • supporter
    • 0 kudos
    Can't figure out how to run the script as an administrator, there is no option in the right-click menu, or in the properties (Win 10). And when I run it without admin, it doesn't do anything in game. 
    1. Showcase10
      Showcase10
      • premium
      • 1 kudos
      put the left alt tab on you're desktop (copy and paste) then right click that icon and u should see some options like run in admin
  10. calamond
    calamond
    • supporter
    • 0 kudos
    Unless I’m mistaken, the latest version of ImprovedUI has a similar function built in.
    1. Showcase10
      Showcase10
      • premium
      • 1 kudos
      Didn't knew that thx :-)
    2. wanderingHP
      wanderingHP
      • supporter
      • 1 kudos
      It does not do the same as this mod, no.