• Stars
    star
    156
  • Rank 238,024 (Top 5 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

โŒจ Supercharge your Control key: Tap it for Escape. Hold it for Control.

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. โŒจ๐Ÿค“

More Repositories

1

keyboard

โŒจ Toward a more useful keyboard
Lua
2,068
star
2

stratify

Rails + MongoDB app for building a consolidated timeline of your data from disparate sources (e.g., Twitter, GitHub, Foursquare, etc.)
Ruby
96
star
3

launchbar-emoji-lookup

LaunchBar action to find the perfect emoji by name or keyword ๐Ÿ”Ž
JavaScript
49
star
4

one-rep-max

To some extent: A ClojureScript app for tracking workout data. But mostly: Some guy on the internet trying his hand at ClojureScript.
Clojure
35
star
5

getting-started-with-grails

Conference Talk - Getting Started with Grails
Groovy
23
star
6

dotfiles

Config files for bash, completions, git, irb, rails, VS Code, etc.
Ruby
20
star
7

going-further-with-grails

Conference Talk - Going Further with Grails
Groovy
14
star
8

bending-gorm

Conference Talk - Bending GORM: 5-minute Techniques for Enterprise Integration
Groovy
11
star
9

launchbar-sonos-actions

A few LaunchBar actions for controlling your Sonos system ๐Ÿ”‰๐ŸŽถ
AppleScript
7
star
10

racetrack

Sample application from "Getting Started with Grails" (http://infoq.com/minibooks/grails)
JavaScript
6
star
11

launchbar-actions

A collection of LaunchBar actions that I find particularly useful
Shell
6
star
12

toggle-markdown-task

:atom: An Atom package to toggle completion of tasks in Markdown task lists
JavaScript
5
star
13

significant-other-atom

:atom: An Atom package to quickly switch between a source file and its corresponding test file
JavaScript
3
star
14

triangle-techgirlz-project

http://jasonrudolph.github.io/triangle-techgirlz-project
CSS
1
star
15

sublime-text-2-user-settings

My settings for Sublime Text 2
Python
1
star