Ask HN: What are your clever keyboard automation entries?
I have AutoHotKey[1] for years but only recently started to make a real use of it. It is surprisingly powerful but of course does not work on its own - it needs actions to perform as a response to <something>.
I would be grateful for the interesting setups you may have (with AHK or anything else). A few of mine are below.
; I repurposed the numerical pad as a handy launcher, when it is in non-numerical mode. Keys have various actions assigned, more or less in a mnemotechnic way. I was wondering how to improve this (maybe some kind of 3D printed array with descriptions)
; numeric pad when not numeric
#HotIf !GetKeyState("NumLock", "T")
; super insecure way to provide a password for entries that are not managed by Bitwarden
NumpadMult:: Send("somepassword{Enter}")
; auto-complete login form from Bitwarden
NumpadAdd:: Send("{Ctrl Down}{Shift Down}l{Shift Up}{Ctrl Up}{Enter}")
; open Executor[2] to search for commands or macros
NumpadEnter:: Send("{Alt Down}{Space}l{Alt Up}")
; add a new tab to Chrome
NumpadSub:: Run "https://www.google.com"
#HotIf
; mute Zoom
Volume_Mute::
{
zoomWindowName := "Zoom Meeting"
if WinExist(zoomWindowName)
{
WinActivate(zoomWindowName)
WinWaitActive(zoomWindowName)
Send "!a"
} else
SoundSetMute +1
}
; better arrows - need to update that one to exclude vscode
::->::{U+2192}
::<-::{U+2190}
::<->::{U+21C6}
; replace the string mdcode with a Markdown ``` ... ``` entry, optionally with a language hint
:b0:mdcode::
{
;CaretGetPos(&CaretX, &CaretY)
Send "{bs 7}"
Sleep 100
Lang := InputBox(, "input MD code language")
Sleep 100
Send "{U+0060}{U+0060}{U+0060}" . Lang.Value . "`n`n{U+0060}{U+0060}{U+0060}{Up}"
}
I also added foreign languages combinations to get their diacritics instead of switching the keyboard.[1] https://www.autohotkey.com/
[2] https://executor.dk/
0 comments
[ 3.7 ms ] story [ 7.7 ms ] threadNo comments yet.