forward and back button no longer working in some programs Topic is solved

Report problems with documented functionality
photoenix
Posts: 2
Joined: 17 May 2022, 22:40

forward and back button no longer working in some programs

Post by photoenix » 17 May 2022, 22:59

ahk 1.1.34.02

forward and back button no longer working in windows explorer, jellyfin, plex
but they work in firefox, chrome

pausing the script does not fix the issue, only exiting

worked fine in 1.1.33.x

this is my script for my g502:

Code: Select all

F13::^v
F14::^c

F15::^+Tab
F16::^Tab

XButton1 & LButton::^w

XButton2 & LButton::!LButton
XButton2 & RButton::!RButton

XButton1 & WheelUp::Volume_Up
XButton1 & WheelDown::Volume_Down

XButton1 & F15::Media_Prev
XButton1 & F16::Media_Next

XButton2 & F15::WheelLeft
XButton2 & F16::WheelRight

XButton1 & F14::^x

XButton1 & MButton::Volume_Mute
XButton1 & F13::Media_Play_Pause

$XButton1::XButton1
$XButton2::XButton2

XButton2 & MButton::
Send #+g
#IfWinActive ahk_class Chrome_WidgetWin_1
Sleep, 2000
Send toggle light{enter}{Esc}
return

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: forward and back button no longer working in some programs

Post by lexikos » 25 May 2022, 06:37

Pausing a script only affects timers and currently running threads, not hotkeys that you haven't pressed yet. To disable the hotkeys, you need to Suspend Hotkeys.


I don't have XButton2, but XButton1 is working fine for me in Windows Explorer, with your script on v1.1.34.02.

However, it is only sending {XButton1 up}, not {XButton1 down}. This is sufficient for Explorer, at least on Windows 11, but not the intended behaviour as of v1.1.14.

$XButton1::XButton1 is not a hotkey, but a remap.

I would suggest you avoid using the remap syntax with the prefix key of a custom combination. Each remapping is translated to a pair of hotkeys - one for key-down, one for key-up. Because prefix keys are supposed to fire their hotkeys on key-release, for a remapping (in v1.1.14+, excluding bugs) this means firing the key-down hotkey immediately followed by the key-up hotkey. It is more efficient to simply send the key (XButton1::Send {XButton1}) or for mouse buttons, click (XButton1::Click X1). You can optionally add the * prefix, which is implied for remapping.

Using a single hotkey instead of a remap (or pair of hotkeys) will also avoid this issue.


The $ prefix has no effect for hotkeys which require the hook for some other reason. Hotkeys with the * prefix always require the hook, therefore remapping always requires the hook. Hotkeys for prefix keys (keys which are also used as the prefix in a custom combination) also always require the hook. Mouse hotkeys of any kind always require the mouse hook. $ has no effect in any of these cases.

photoenix
Posts: 2
Joined: 17 May 2022, 22:40

Re: forward and back button no longer working in some programs

Post by photoenix » 27 May 2022, 22:20

thanks! ❤️


Post Reply

Return to “Bug Reports”