X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=docs%2Ffeature_grave_esc.md;h=f57c6042ca5a0a97dea440a13aed4415ce9ce854;hb=3538955778c253e68779605cc67c27e15d195729;hp=9a14daf2afde415520f6212e4c0de8a8d8f6f373;hpb=7b0356d1d49da6574570e110f61f95692afdb3d0;p=qmk_firmware.git diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md index 9a14daf2a..f57c6042c 100644 --- a/docs/feature_grave_esc.md +++ b/docs/feature_grave_esc.md @@ -1,17 +1,32 @@ # Grave Escape -Grave Escape is a feature that allows you to share the grave key (` and `~`) on the same key as Escape. When `KC_GESC` is used it will act as `KC_ESC`, unless Shift or GUI is pressed, in which case it will act as `KC_GRAVE`. +If 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 (` and `~`) with Escape. +## Usage -| Key | Alias | Description | -|-----|-------|-------------| -| `GRAVE_ESC` | `KC_GESC` | Act as `KC_ESC` normally, or `KC_GRAVE` when GUI or Shift are held. | +Replace 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. -There are several possible key combinations this will break, among them Ctrl+Shift+Esc on Windows and Cmd+Opt+Esc on macOS. You can use these options in your `config.h` to work around this: +## What Your OS Sees -| Option | Description | -|--------|-------------| -| `GRAVE_ESC_ALT_OVERRIDE` | Always send Escape if Alt is pressed. | -| `GRAVE_ESC_CTRL_OVERRIDE` | Always send Escape if Ctrl is pressed. | -| `GRAVE_ESC_GUI_OVERRIDE` | Always send Escape if GUI is pressed. | -| `GRAVE_ESC_SHIFT_OVERRIDE` | Always send Escape if SHIFT is pressed. | +If 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 ` character. + +## Keycodes + +|Key |Aliases |Description | +|---------|-----------|------------------------------------------------------------------| +|`KC_GESC`|`GRAVE_ESC`|Escape when pressed, ` when Shift or GUI are held| + +### Caveats + +On macOS, Command+` 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. + +## Configuration + +There 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`: + +|Define |Description | +|--------------------------|-----------------------------------------| +|`GRAVE_ESC_ALT_OVERRIDE` |Always send Escape if Alt is pressed | +|`GRAVE_ESC_CTRL_OVERRIDE` |Always send Escape if Control is pressed | +|`GRAVE_ESC_GUI_OVERRIDE` |Always send Escape if GUI is pressed | +|`GRAVE_ESC_SHIFT_OVERRIDE`|Always send Escape if Shift is pressed |