RepositoryLuaUSUnited States
jasonrudolph

jasonrudolph/ControlEscape.spoon

⌨ Supercharge your Control key: Tap it for Escape. Hold it for Control.

168stars
22forks
1issues
1views

ControlEscape.spoon

Supercharge your control key. Tap it for escape. Hold it for control.

A more useful control key

As Steve Losh points out in his Modern Space Cadet post, there are "keys you hold down to change how other keys behave, but that (usually) don’t do anything if you use them on their own" (e.g., control), and there are "keys that you press and release but don’t want to 'repeat' as you hold them" (e.g., escape). "There are two [distinctly] different ways to use [these keys] and they’re each only useful in one of those ways. This means that we can combine them onto a single key without losing any useful functionality!"

With that in mind, we can teach the control key to pull double duty:

  • If control is pressed and released in isolation, we can interpret it as escape
  • If control is held down and used in combination with another key, then we can let it provide the normal control key behavior

Goes great with Touch Bar

If you've got one of those fancy new Touch Bar Macs, you might find yourself longing for the good ol' days of a tactile escape key. Look no further. 😅

Optional: A more useful caps lock key

What's more useful than a "more useful control key?" A more useful and more-easily reachable control key, of course. By repurposing the anachronistic caps lock key, we can skip the acrobatics needed to reach the physical control key. We can use caps lock to give us control and escape right on the home row.

Say goodbye to Emacs pinky. 👋

Dependencies

This functionality is developed and tested with the following dependencies:

Installation

Just the basics

mkdir -p ~/.hammerspoon/Spoons

git clone https://github.com/jasonrudolph/ControlEscape.spoon.git ~/.hammerspoon/Spoons/ControlEscape.spoon

cd ~/.hammerspoon/Spoons/ControlEscape.spoon

script/setup

Optional: You're just a few seconds away from a more useful caps lock key

With one more bit of setup, you'll be able to hold caps lock for control, and tap caps lock for escape:

Open System Preferences, navigate to Keyboard > Modifier Keys, and set the caps lock key to control. [screenshot]

Now you're ready to rock. 🤘

Where can I get this code as a Spoon?

If you prefer to roll your own Hammerspoon config, this code is also available as a Spoon. Just look for ControlEscape.spoon.zip included with the latest release.

Shout-outs

Shout-out to @arbelt and @jasoncodes for the original implementation of this functionality. ⚡️🍻🌟

This code is an adaptation of their work:

You might also like...

Still reading? Dude, you're pretty serious about your keyboard. :neckbeard:

Lucky for you, there's more where this came from. Check out jasonrudolph/keyboard for even more fun. ⌨🤓

Similar Projects

Discover other similar projects and AI models.

RepositoryLua
jasonrudolph/keyboard

⌨ Toward a more useful keyboard

2.2k
Oct 13, 2025
RepositoryC
susam/uncap

Map Caps Lock to Escape or any key to any key

1.2k
Jan 1, 2023
RepositorySwift
MonitorControl/MonitorControl

🖥 Control your display's brightness & volume on your Mac as if it was a native Apple Display. Use Apple Keyboard keys or custom shortcuts. Shows the native macOS OSDs.

34.9k
Oct 14, 2026
RepositoryDart
flutter/flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

181.5k
Nov 28, 2026
Repository
jlevy/the-art-of-command-line

Master the command line, in one page

162.8k
Jun 25, 2024
RepositoryJavaScript
nodejs/node

Node.js JavaScript runtime ✨🐢🚀✨

124.1k
Nov 30, 2026
RepositorySwift
jaywcjlove/awesome-mac

 This project is dedicated to collecting high-quality macOS software and organizing them systematically by different categories for easy search and use.

120.1k
Dec 2, 2026
RepositoryShell
tw93/Mole

🐹 Open-source Mac and PC cleaner. Keep your machine clean, light, and running like new. Fast CLI, plus native Mac and Windows apps.

76.9k
Dec 2, 2026
RepositoryRust
alacritty/alacritty

A cross-platform, OpenGL terminal emulator.

66.4k
Dec 1, 2026