aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-02-20 14:25:48 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-02-20 14:25:48 +0100
commit323ea6967ff94761f2ca20779d9012090c395e1a (patch)
treeb2e7117028a676c2b0e90f1b6810703a13ee0771
parentf58ef1bbd61ecc9f805fa6b71ee2d81db49ee428 (diff)
Removed the code from the old caps_word mode
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c59
1 files changed, 10 insertions, 49 deletions
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c
index e82eed5..4fba73c 100644
--- a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c
@@ -2,49 +2,6 @@
#include "keymap_bepo.h"
#include "keycodes.h"
-/*
- * Rules and modifier to apply over the keycodes. This includes the keys
- * redefinitions and the keys to include in the caps_word mecanism.
- *
- * All thoses update are working over the custom keys declared in `keycodes.h`
- */
-
-/*
- * This function need to be declared after the key definition, including the
- * tapdance keys because I need to reference the keycode here if I want to
- * include them in the caps_word mecanism.
- */
-bool caps_word_press_user(uint16_t keycode) {
- switch (keycode) {
- // Keycodes that continue Caps Word, with shift applied.
- case KC_A ... KC_Z:
- case KC_1 ... KC_0:
- case KC_MINS:
- case KEY_W:
- case KEY_E:
- case BP_Z: // Additionals keys from the bepo layout.
- case BP_M:
- case BP_G:
- case BP_H:
- case BP_N:
- case BP_F:
- add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
- return true;
-
- // Keycodes that continue Caps Word, without shifting.
- case KC_BSPC:
- case KC_DEL:
- return true;
- case KC_SPACE:
- // The space key is used in order to generate the _ symbol,
- // I check which modifier is applied, it’s ok when it’s ALT
- return get_mods() & MOD_MASK_ALT;
-
- default:
- return false; // Deactivate Caps Word.
- }
-}
-
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KEY_E:
@@ -60,17 +17,21 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer; // timer for last keyboard activity, use
// 32bit value and function to make longer
// idle time possible
-static uint16_t latest_key = 0L;
bool keycodes_process_record(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
- // store time of last key release. This is used as a counter in order to
- // know if we are inside a typing sequence or not.
- key_timer = timer_read32();
- latest_key = keycode;
- }
+ switch (keycode) {
+ case KC_ESC:
+ case AL_ENT:
+ break;
+ default:
+ // store time of last key release. This is used as a counter in order to
+ // know if we are inside a typing sequence or not.
+ key_timer = timer_read32();
+ }
+ }
switch (keycode) {
case KC_ESC: