mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-06-08 15:25:16 -04:00
Add ESC key overrides: Ctrl→` and Shift→~
Replace QK_GESC with KC_ESC and use the Key Overrides feature to send backtick on Ctrl+ESC and tilde on Shift+ESC.
This commit is contained in:
parent
f6987c1af2
commit
0629774336
3 changed files with 36 additions and 1 deletions
25
CLAUDE.md
Normal file
25
CLAUDE.md
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
# QMK Keyboard Configuration
|
||||||
|
|
||||||
|
## MANDATORY: Documentation First
|
||||||
|
|
||||||
|
Before editing ANY QMK configuration file, you MUST:
|
||||||
|
1. Fetch the relevant page from https://docs.qmk.fm to verify current API, functions, and macros
|
||||||
|
2. Never invent or guess function names — always confirm they exist in the official docs
|
||||||
|
3. If unsure whether a feature/function exists, check docs.qmk.fm before writing any code
|
||||||
|
|
||||||
|
## Key documentation pages to check (by task):
|
||||||
|
- Keycodes: https://docs.qmk.fm/keycodes
|
||||||
|
- Layers: https://docs.qmk.fm/feature_layers
|
||||||
|
- Macros: https://docs.qmk.fm/feature_macros
|
||||||
|
- Tap Dance: https://docs.qmk.fm/feature_tap_dance
|
||||||
|
- Combos: https://docs.qmk.fm/feature_combo
|
||||||
|
- Custom shifts: https://docs.qmk.fm/feature_key_overrides
|
||||||
|
- config.h options: https://docs.qmk.fm/config_options
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
- Always use the exact function signatures from docs.qmk.fm
|
||||||
|
- Do not use functions from memory if they can be verified online
|
||||||
|
- If a docs page contradicts your training data, trust the docs page
|
||||||
|
|
||||||
|
## Git
|
||||||
|
- Never mention Claude or Claude Code as author or co-author in commit messages
|
||||||
|
|
@ -2,6 +2,15 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const key_override_t ctrl_esc_override = ko_make_basic(MOD_MASK_CTRL, KC_ESC, KC_GRV);
|
||||||
|
const key_override_t shift_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRV));
|
||||||
|
|
||||||
|
const key_override_t *key_overrides[] = {
|
||||||
|
&ctrl_esc_override,
|
||||||
|
&shift_esc_override,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
// Define custom keycodes
|
// Define custom keycodes
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
// F19 on tap, Hyper (Cmd+Ctrl+Opt+Shift) on hold
|
// F19 on tap, Hyper (Cmd+Ctrl+Opt+Shift) on hold
|
||||||
|
|
@ -10,7 +19,7 @@ enum custom_keycodes {
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT(
|
||||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||||
HYPER_F19, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
HYPER_F19, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(1), KC_9, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_BSLS),
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(1), KC_9, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_BSLS),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
CONVERT_TO=rp2040_ce
|
CONVERT_TO=rp2040_ce
|
||||||
|
|
||||||
ENCODER_MAP_ENABLE = yes
|
ENCODER_MAP_ENABLE = yes
|
||||||
|
KEY_OVERRIDE_ENABLE = yes
|
||||||
AUTO_SHIFT_ENABLE = no
|
AUTO_SHIFT_ENABLE = no
|
||||||
|
|
||||||
# CAPS_WORD_ENABLE = yes
|
# CAPS_WORD_ENABLE = yes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue