Advertisement
Pandamonium_42

PoE2 - Rebind Shift with Space and vice-versa

Apr 26th, 2025
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 0.69 KB | Source Code | 0 0
  1. #Persistent
  2. #SingleInstance Force
  3.  
  4. ; Check active window every 5ms
  5. SetTimer, CheckWindow, 5
  6. return
  7.  
  8. CheckWindow:
  9.    WinGet, pid, PID, A
  10.     if (pid) {
  11.         Process, Exist, pathofexilesteam.exe
  12.         if (pid == ErrorLevel) {
  13.             ; Remap inside the game
  14.             Hotkey, *Space, SpaceAsShift, On
  15.             Hotkey, *Shift, ShiftAsSpace, On
  16.             return
  17.         }
  18.     }
  19.     ; Otherwise, turn remaps off
  20.     Hotkey, *Space, SpaceAsShift, Off
  21.     Hotkey, *Shift, ShiftAsSpace, Off
  22. return
  23.  
  24. SpaceAsShift:
  25.    Send {Shift down}
  26.     KeyWait, Space
  27.     Send {Shift up}
  28. return
  29.  
  30. ShiftAsSpace:
  31.    Send {Space down}
  32.     KeyWait, Shift
  33.     Send {Space up}
  34. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement