YouTube Key Remap

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jack3333
Posts: 12
Joined: 15 Nov 2017, 14:49

Re: YouTube Key Remap

22 Dec 2017, 01:03

Exaskryz wrote:So if you got into the habit of typing your search queries in all caps (holding shift), or at least always capitalize f, it would be fine.
I think this will do. Call me lazy but the other stuff is more complicated, and I want to keep it simple.
I just thought that maybe AHK could tell when the cursor is on a search box.
It's not a big problem. My main issue was resolved. Thanks both of you.
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: YouTube Key Remap

22 Dec 2017, 01:20

You might be able to use the variables A_CaretX and A_CaretY which are meant to tell you where the caret (blinky line when typing) is on your screen. But it may not work within browsers. I just tested in my firefox fork, chrome, and vivaldi (also chromium based like opera) and it didn't work. I used this code, which worked in Notepad++:

Code: Select all

Loop
{
Sleep 100
Tooltip %A_CaretX%`n%A_CaretY%
}
--

Another approach you could consider which would be different altogether is having AHK notice when a window has gone into the "f mode" for video fullscreen (which I'm unfamiliar with) based on the dimensions of the window or if a message gets displayed notifying you you're in full screen and using an imagesearch for it, that it would then flip itself out of f mode again by artificially pressing f then artificially pressing {f11} for you. Something like this:

Code: Select all

#Persistent
SetTimer, CheckYouTube, 1000
return

CheckYouTube:
WinGetTitle, var, A
If InStr(var,"Youtube") ; not sure if I used this command right, did not double check
{
WinGetPos, pos, A ; you'd need to set the numbers to what is reported by Window Spy in the f mode for x/y and width/height. I think those are the right variable names for WinGetPos, but double check too 
If posx=-8 && posy=-8 && posh=1216 &&posw=1916
{
Send f
Sleep 100
Send {f11}
}
}
return
The code is untested.
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: YouTube Key Remap

22 Jan 2018, 22:05

Is it possible to disable this when I'm typing in the YouTube search box?
You can do it with enabling accessibility through chrome://accessibility/ and running opera with this parameter --force-renderer-accessibility.
Then You need to use Acc library.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, slowwd and 212 guests