XButton not working in Chrome YouTube

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
disown
Posts: 3
Joined: 26 Mar 2023, 08:11

XButton not working in Chrome YouTube

Post by disown » 26 Mar 2023, 08:22

I have a mouse with side buttons. I mapped some of them to F19/F20 in my mouse software, and in AHK I have

$F19::Send {XButton1} ;
$F20::Send {XButton2} ;

This used to work but recently stopped working when on youtube.com in Chrome.
When pressing the F19 key, I get a "turn on caret browsing" prompt (https://support.google.com/chrome/answer/10129654?hl=en-GB), that should appear only when pressing F7.

Any ideas?

[Mod edit: Moved topic to v1 help, based on posted code.]

User avatar
mikeyww
Posts: 26871
Joined: 09 Sep 2014, 18:38

Re: XButton not working in Chrome YouTube

Post by mikeyww » 26 Mar 2023, 11:07

Welcome to this AutoHotkey forum!

I would have a look at your browser & Web site. The script is probably not the source of the problem.

Have a look at the :arrow: KeyHistory to learn what the keys are doing.

disown
Posts: 3
Joined: 26 Mar 2023, 08:11

Re: XButton not working in Chrome YouTube

Post by disown » 29 Mar 2023, 07:12

My KeyHistory shows:

82 06A h d 1.77 F19
76 041 i d 0.00 F7
82 06A s u 0.11 F19
76 041 i u 0.00 F7

The F7 lines don't appear on other sites. Could it be Chrome intercepting the keys before AHK? Anyway to avoid that if so?

disown
Posts: 3
Joined: 26 Mar 2023, 08:11

Re: XButton not working in Chrome YouTube

Post by disown » 29 Mar 2023, 07:18

Ah I figured it out.

I had a "#IfWinActive, <title>" block in my AHK script and that YouTube video I was testing this on just happened to have a title that matches the <title>.

Post Reply

Return to “Ask for Help (v1)”