Control window layout using CTRL + number keys on macOS. Press two number keys in a row while holding down CTRL to select the new window position on a 3x3 grid.
This fork adds window spacing and changes the way CTRL-0 commands work. CTRL-0 CTRL-1-6 commands reposition windows on a 3x2 grid. CTRL-0 CTRL-7-0 commands reposition windows on a 2x2 grid.
Download the latest release and copy Keypad Layout.app
to /Applications
.
You can run Keypad Layout on startup by adding the plist
to your LaunchAgents
:
git clone https://github.com/jasonwoodland/keypad-layout
cp keypad-layout/com.jan-gerd.keypad-layout.plist ~/Library/LaunchAgents
launchctl load -wF ~/Library/LaunchAgents/com.jan-gerd.keypad-layout.plist
You can set the window spacing and screen margin while Keypad Layout is running:
defaults write com.jan-gerd.keypad-layout '{ margin = "{24, 24}"; screenMargin = "{24, 24}"; }'
Key Command | Window Position |
---|---|
CTRL-1 CTRL-9 | Full screen |
CTRL-7 CTRL-9 | Top third |
CTRL-1 CTRL-3 | Bottom third |
CTRL-3 CTRL-1 | Bottom third |
CTRL-1 CTRL-7 | Left third |
CTRL-1 CTRL-8 | Left two thirds |
CTRL-0 CTRL-1 CTRL-1 | Bottom half, left third |
CTRL-0 CTRL-3 CTRL-3 | Bottom half, right third |
CTRL-0 CTRL-4 CTRL-4 | Top Half, left third |
CTRL-0 CTRL-6 CTRL-6 | Top Half, right third |
CTRL-0 CTRL-2 CTRL-3 | Bottom half, two right thirds |
CTRL-0 CTRL-5 CTRL-6 | Top half, two right thirds |
CTRL-0 CTRL-7 CTRL-9 | Left half |
CTRL-0 CTRL-8 CTRL-0 | Right half |
CTRL-0 CTRL-9 CTRL-0 | Top half |
CTRL-0 CTRL-7 CTRL-8 | Bottom half |
CTRL-0 CTRL-7 CTRL-7 | Bottom left corner |
CTRL-0 CTRL-0 CTRL-0 | Top right corner |
killall Keypad\ Layout
launchctl unload -wF ~/Library/LaunchAgents/com.jan-gerd.keypad-layout.plist
rm ~/Library/LaunchAgents/com.jan-gerd.keypad-layout.plist
rm -rf /Users/Shared/Keypad\ Layout.app
The application and menu bar icons are derived from numpad by Ján Slobodník from the Noun Project, available under the Creative Commons Attribution license.