Skip to content

Instantly share code, notes, and snippets.

@davebrny
Last active December 10, 2017 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davebrny/c513afb65444768657d61f960ef8c037 to your computer and use it in GitHub Desktop.
Save davebrny/c513afb65444768657d61f960ef8c037 to your computer and use it in GitHub Desktop.
๐Ÿ‘๏ธ (autohotkey) - peek under the current window without deactivating it
#noEnv
#singleInstance, force
return ; end of auto-execute
; --------------------------
;# persistent peek
#!tab::
if (peeking)
goSub, stop_peeking
else goSub, peek_under
return
~esc::goSub, stop_peeking
;# momentary peek
lbutton & tab:: goSub, peek_under
lbutton & tab up::goSub, stop_peeking
; -----------------------------------
peek_under:
if (peeking != true)
{
winGet, peeker, id, a
winSet, trans, 0, ahk_id %peeker%
peeking := true
}
return
stop_peeking:
if (peeking)
{
winSet, trans, 255, ahk_id %peeker%
peeking := false
}
return
/*
[script info]
version = 0.3
description = peek under the current window without deactivating it
author = davebrny
source = https://gist.github.com/davebrny/c513afb65444768657d61f960ef8c037
*/
@davebrny
Copy link
Author

davebrny commented Dec 2, 2017

peek under

peek at the windows under the current window without deactivating it

this can be useful if a window is maximised and you want to write down something from another window without having to alt+tab back and forth. ย  any keystrokes will be sent to the current window even though its not visible

persistent peek

press win alt + tab to peek, when youre done press the same hotkey again or esc to stop peeking through the window

momentary peek

press and hold the left mouse button + tab to peek, then release the tab key to stop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment