Last active
December 23, 2015 16:39
-
-
Save slikts/6663742 to your computer and use it in GitHub Desktop.
Toggle play/pause with window selection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Bind Ctrl+Win+Space to select the video window for toggling. | |
; If it's a browser window and the video player is Flash (it most commonly is), | |
; then the player itself needs to be focused by clicking on the player. | |
; If the player is not focused the page will likely just get | |
; scrolled down without play/pause being toggled. | |
; I've made a Chrome extension to focus the YouTube player automatically: http://bit.ly/1gPHwI8 | |
^#space:: WinGet, winid ,, A | |
; Bind Win+Space to send the Space keystroke to the selected window. | |
; This will only work if the player supports a Space hotkey for toggling play/pause. | |
; You can replace {Space} with {Right} to turn a page, for example. | |
; A list of all possible keystrokes can be found here: http://autohotkey.com/docs/commands/Send.htm | |
#space:: ControlSend,, {Space}, ahk_id %winid% | |
; This document explains how the Ctrl+Win+Space and Win+Space | |
; hotkeys can be customized: http://autohotkey.com/docs/Hotkeys.htm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment