Add 'bootloadHID' flash target (#5587)
[jackhill/qmk/firmware.git] / docs / feature_grave_esc.md
CommitLineData
0b54e7f5 1# Grave Escape
2
2bc34b09 3If you're using a 60% keyboard, or any other layout with no F-row, you will have noticed that there is no dedicated Escape key. Grave Escape is a feature that allows you to share the grave key (<code>&#96;</code> and `~`) with Escape.
0b54e7f5 4
2bc34b09 5## Usage
6
f3bdd436
YFL
7Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead.
8
9## What Your OS Sees
10
11If Mary presses GESC on her keyboard, the OS will see an KC_ESC character. Now if Mary holds Shift down and presses GESC it will output `~`, or a shifted backtick. Now if she holds GUI/CMD/WIN, it will output a simple <code>&#96;</code> character.
2bc34b09 12
13## Keycodes
0b54e7f5 14
4c675a83 15|Key |Aliases |Description |
16|---------|-----------|------------------------------------------------------------------|
17|`KC_GESC`|`GRAVE_ESC`|Escape when pressed, <code>&#96;</code> when Shift or GUI are held|
0b54e7f5 18
f3bdd436
YFL
19### Caveats
20
3510d8dc 21On macOS, Command+<code>&#96;</code> is by default mapped to "Move focus to next window" so it will not output a backtick. Additionally, Terminal always recognises this shortcut to cycle between windows, even if the shortcut is changed in the Keyboard preferences.
f3bdd436 22
2bc34b09 23## Configuration
24
25There are several possible key combinations this will break, among them Control+Shift+Escape on Windows and Command+Option+Escape on macOS. To work around this, you can `#define` these options in your `config.h`:
0b54e7f5 26
2bc34b09 27|Define |Description |
28|--------------------------|-----------------------------------------|
29|`GRAVE_ESC_ALT_OVERRIDE` |Always send Escape if Alt is pressed |
30|`GRAVE_ESC_CTRL_OVERRIDE` |Always send Escape if Control is pressed |
31|`GRAVE_ESC_GUI_OVERRIDE` |Always send Escape if GUI is pressed |
32|`GRAVE_ESC_SHIFT_OVERRIDE`|Always send Escape if Shift is pressed |