Targeted Application Pairing System w/ Hotkey Oriented Playback
Taps on your keyboard converted to efficient window hopping.
- Window pairing slots (
1-9) so one hotkey can jump back to a specific app window. - Context-aware pair/focus/minimize flow:
- First press pairs current window to slot.
- Later press on same slot focuses paired window.
- Double-tap while already focused to minimize (configurable).
- Global media-style controls:
- YouTube seek/play targeting browser tabs by window title.
- Spotify transport/seek/volume controls.
- Install AutoHotkey v2.0
- Run
TAPSHOP-windows/TAPSHOP.ahk
This repository ships source scripts. If you want a standalone .exe, compile TAPSHOP-windows/TAPSHOP.ahk with AutoHotkey v2's compiler (Ahk2Exe).
Tip
- Place script ahk/exe (or shortcut) in
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startupto autorun on startup. - Applications running at admin level will ignore script functions, which can be fixed by also running the script ahk/exe as admin.
Warning
- Setting the run as admin flag on with the script in the Startup folder (as shown below) will NOT autorun the script on startup.
- To allow this script to autorun at admin level on startup, use the native Windows Task Scheduler to bypass the UAC prompt requirement needed for script execution permission.
Windows: Refer to AHK's Hotkeys & List of Keys documentation for modifiers & keycodes.
| Hotkey | Action |
|---|---|
Win + [1-9] |
Pair/focus/minimize slot [1-9] |
Ctrl + Win + [1-9] |
Unpair slot [1-9] |
Ctrl + Win + 0 |
Unpair all slots |
| `Win + `` | Show active window stats |
| `Ctrl + Win + `` | Toggle TAPSHOP GUI |
F19 / Ctrl + F19 |
YouTube rewind 5s / 10s |
F20 |
YouTube play/pause |
F21 / Ctrl + F21 |
YouTube forward 5s / 10s |
Media_Prev / Media_Play_Pause / Media_Next |
Spotify previous/play-pause/next |
Ctrl + Media_Prev / Ctrl + Media_Next |
Spotify seek backward/forward |
F22 |
Spotify like/unlike |
F23 / F24 |
Spotify volume down/up |
Ctrl + F22 / Ctrl + F23 / Ctrl + F24 |
System mute / volume down / volume up |
- Install Hammerspoon
- Copy or symlink
TAPSHOP-macos/TAPSHOP.luainto your~/.hammerspoon/directory - Add
require("TAPSHOP")to your~/.hammerspoon/init.lua - Reload Hammerspoon config (⌘ + ⇧ + R from menu bar, or
hs.reload())
TAPSHOP stores its macOS files under ~/.hammerspoon/tapshop/:
settings.jsonfor user-facing preferences and hotkey overridesappdata.jsonfor internal persisted state such as pairings and window geometry
- Grant Hammerspoon Accessibility access in
System Settings -> Privacy & Security -> Accessibility. - If prompted during Spotify actions, allow Apple Events/Automation permissions for Hammerspoon.
macOS: Refer to Hammerspoon's hs.hotkey documentation.
| Hotkey | Action |
|---|---|
Cmd + Option + [1-9] |
Pair/focus/minimize slot [1-9] |
Cmd + Option + Shift + [1-9] |
Unpair slot [1-9] |
Cmd + Option + Shift + 0 |
Unpair all slots |
| `Cmd + Option + `` | Toggle popover UI |
Cmd + Option + Left/J |
YouTube rewind 5s / 10s |
Cmd + Option + Right/L |
YouTube forward 5s / 10s |
Cmd + Option + K |
YouTube play/pause |
F19/F20/F21 (+ Ctrl variants) |
Optional YouTube bindings (if key exists) |
F7/F8/F9 (+ Ctrl variants) |
Optional Spotify media + seek bindings |
F22/F23/F24 |
Optional Spotify like + volume bindings |
Cmd + Option + Ctrl + ,/. / M |
System volume down/up/mute |
Hotkeys can be remapped from the popover settings:
- Press `Cmd + Option + `` to open the popover
- Click the cog icon in the header
- Use the
GeneralorHotkeystab
If you remap the popover shortcut away from `Cmd + Option + ``, TAPSHOP keeps a hidden recovery path: press the default shortcut three times quickly to show the popover.
---
- YouTube targeting is title-based and browser-filtered. Expected title pattern includes
- YouTube;Subscriptions - YouTubeis intentionally ignored. - Slot minimize behavior is threshold-based (
minimizeThreshold), not immediate on first repeat press. - On macOS, slot pairings persist across Hammerspoon reloads/restarts. Closed paired windows can remain recoverable and relink automatically when a matching window returns, depending on settings.
- On Windows, Spotify transport is sent using
WM_APPCOMMAND; on macOS it uses Hammerspoon Spotify APIs + AppleScript helpers.
- YouTube commands do nothing:
- Ensure a supported browser window title currently matches a YouTube watch page.
- Open a video tab once to refresh target detection.
- Pairing hotkeys do nothing on Windows:
- Check if target app is elevated (run TAPSHOP as admin too).
- macOS hotkeys not firing:
- Confirm Hammerspoon Accessibility permission is enabled.
- Some optional F-key bindings are only registered if that key exists in
hs.keycodes.map. - If you remapped the popover toggle and forgot it, press `Cmd + Option + `` three times quickly to reopen the popover.
- Spotify actions fail on macOS:
- Open Spotify at least once and allow Automation prompts for Hammerspoon.
| Path | Purpose |
|---|---|
TAPSHOP-windows/TAPSHOP.ahk |
Main Windows implementation (AHK v2) |
TAPSHOP-macos/TAPSHOP.lua |
Main macOS implementation (Hammerspoon) |
GYTP-AHKv2-media-keys |
Legacy media-key-focused script |
GYTP-AHKv2-keyboard-75 |
Legacy 75% keyboard variant |
GYTP-AHKv1.1-deprecated |
Legacy AHK v1.1 script |
The original single-purpose scripts are preserved in their respective folders:
| Folder | Description |
|---|---|
GYTP-AHKv2-media-keys |
AHK v2 — media key hotkeys (original) |
GYTP-AHKv2-keyboard-75 |
AHK v2 — QMK 75% keyboard variant (details) |
GYTP-AHKv1.1-deprecated |
AHK v1.1 — deprecated |
This project's scripts are provided under the MIT license.
Windows (AHK): The AutoHotkey interpreter is under the GPL-2.0 license. This applies to compiled builds (.exe) because they bundle the AHK script and interpreter. For most users or developers this is not a practical concern, as GPL-2.0 is permissive.
macOS (Hammerspoon/Lua): The macOS stack relies on Hammerspoon (MIT) and Lua (MIT). If you distribute software that includes or depends on them, you must retain their copyright notices and the full MIT license text for each. Hammerspoon’s license is in its repository; Lua’s license is at lua.org/license.html.

