From 6a2bc2d40d8bedb602f403a53de6480cd3969c24 Mon Sep 17 00:00:00 2001 From: Chris Zervakis Date: Fri, 18 Oct 2024 10:09:28 +0300 Subject: [PATCH] Revert "feat: Make my Ctrl/Esc mod-tap an one-shot modifier" This reverts commit f3ecc19479d809ef330507856a67a9d081e73858. --- .../keebio/iris_ce/keymaps/chzerv/keymap.c | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/keyboards/keebio/iris_ce/keymaps/chzerv/keymap.c b/keyboards/keebio/iris_ce/keymaps/chzerv/keymap.c index cee63475..cc3cf004 100644 --- a/keyboards/keebio/iris_ce/keymaps/chzerv/keymap.c +++ b/keyboards/keebio/iris_ce/keymaps/chzerv/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, TAB_EXT, TAB_PRV, TAB_NXT, TAB_NEW, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, KC_BSPC, + _______, _______, TAB_EXT, TAB_NXT, TAB_PRV, TAB_NEW, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, KC_BSPC, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, OSM_G, OSM_A, OSM_S, OSM_C, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,SELWORD, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ @@ -101,21 +101,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// Combine MT (mod-tap) with OSM (one-shot modifiers). -// For example, the key `MT(MOD_LCTL, KC_ESC)` will act as `Escape` when tapped -// and as a one-shot `Control` when held. -// https://getreuer.info/posts/keyboards/faqs/index.html#one-shot-mod-tap-osm-mt -static bool one_shot_mod_tap(uint16_t keycode, keyrecord_t* record) { - if (record->tap.count == 0) { // key is being held - if (record->event.pressed) { - const uint8_t mods = QK_MOD_TAP_GET_MODS(keycode); - add_oneshot_mods(((mods & 0x10) == 0) ? mods : (mods << 4)); - } - return false; // skip the default handling - } - return true; // default handling -} - bool process_record_user(uint16_t keycode, keyrecord_t* record) { // Macros if (record->event.pressed) { @@ -129,10 +114,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) { } } - switch (keycode) { - case CTL_ESC: - return one_shot_mod_tap(keycode, record); - } + // Other macros... // Select word if (!process_select_word(keycode, record, SELWORD)) { return false; }