aboutsummaryrefslogtreecommitdiff
path: root/qmk/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'qmk/keyboards')
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c40
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/keycodes.h6
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/keymap.c14
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/overrides.c46
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c6
-rw-r--r--qmk/keyboards/sofle_choc/keymaps/custom/rules.mk2
6 files changed, 61 insertions, 53 deletions
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c
index 069f5e2..761e653 100644
--- a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.c
@@ -46,44 +46,6 @@ bool caps_word_press_user(uint16_t keycode) {
}
}
-//
-// Override the symbol ° and replace it by `
-// The symbol is still available in the symbol layer with the key just below.
-//
-const key_override_t perc_key_override =
- ko_make_basic(MOD_MASK_SHIFT, KEY_PRC, LSFT(BP_PERC));
-
-//
-// I don’t care of the mapping CTRL+Ç and using the mod_tap does not work well
-// when I type too fast because of tap-dance, so I remap the pattern here.
-//
-const key_override_t c_key_override =
- ko_make_basic(MOD_MASK_CTRL, KEY_C, LCTL(BP_C));
-
-// Same here, I want to be able to type '' without triggering the tapdance.
-// And there is no such key combo for Alt+È.
-const key_override_t quote_key_override =
- ko_make_basic(MOD_MASK_ALT, KEY_EE, RALT(BP_COMM));
-
-// Same here, I override the key W with CTRL because the tapdance activate the
-// caps_word which does not make sense here.
-const key_override_t w_key_override =
- ko_make_basic(MOD_MASK_CTRL, KEY_W, LCTL(BP_W));
-
-const key_override_t e_key_override =
- ko_make_basic(MOD_MASK_CTRL, KEY_E, RCTL(BP_E));
-
-
-// This globally defines all key overrides to be used
-const key_override_t **key_overrides = (const key_override_t *[]){
- &perc_key_override,
- &c_key_override,
- &w_key_override,
- &e_key_override,
- &quote_key_override,
- NULL
-};
-
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KEY_E:
@@ -137,7 +99,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// allow the repetition of KC_BSPC.
case KC_BSPC:
if (record->event.pressed \
- && timer_elapsed32(key_timer) < TAPPING_TERM \
+ && timer_elapsed32(key_timer) < (TAPPING_TERM / 2) \
&& latest_key != keycode)
{
// I completely rewrite the key here, that’s why I’m using tap_code16
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.h b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.h
index 3919f4a..b68fb34 100644
--- a/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.h
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/keycodes.h
@@ -14,8 +14,8 @@ enum {
enum {
LAYER_BASE,
- LAYER_SYMBOLS
-
+ LAYER_SYMBOLS,
+ RIGHT_CTRL,
};
#define MENU LGUI(BP_I)
@@ -25,9 +25,7 @@ enum {
#define LT_SFT TD(TD_LSFT)
#define AL_ENT MT(MOD_RALT, KC_ENT)
#define AL_SPC MT(MOD_LALT, KC_SPC)
-//#define KEY_E TD(TD_E_EE)
#define KEY_E MT(MOD_LCTL, BP_E)
#define KEY_EE TD(TD_EE)
#define KEY_T MT(MOD_RCTL, BP_T)
#define KEY_INS MT(MOD_RGUI, KC_INS)
-
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/keymap.c b/qmk/keyboards/sofle_choc/keymaps/custom/keymap.c
index 292c45a..cd3da66 100644
--- a/qmk/keyboards/sofle_choc/keymaps/custom/keymap.c
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/keymap.c
@@ -42,21 +42,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KEY_PRC,
BP_DLR, BP_B, BP_EACU, BP_P, BP_O, KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z,
KC_TAB, BP_A, BP_U, BP_I, KEY_E, KEY_EE, KEY_C, KEY_T, BP_S, BP_R, BP_N, BP_M,
- LT_SFT, BP_AGRV,BP_Y, BP_X, BP_DOT, KC_B, KC_MUTE, KC_MPLY,BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KEY_W,
- KC_LCTL, KC_DELETE,KC_LGUI,LY_SYMBOL,AL_SPC, AL_ENT, LY_SYMBOL,MENU, KEY_INS, KC_RCTL
+ LT_SFT, BP_AGRV,BP_Y, BP_X, BP_DOT, KC_B, KC_MUTE, KC_MPLY,BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KEY_W,
+ KC_LCTL, KC_DELETE,KC_LGUI,LY_SYMBOL,AL_SPC, AL_ENT, LY_SYMBOL,KC_APP, KEY_INS, KC_RCTL
),
// In the number layout, I keep the mod-tap modifiers applies to the middle letters :
//
-#define KEY_5 MT(MOD_LCTL, KC_P5)
+#define KEY_5 MT(MOD_LCTL, KC_P5)
#define KEY_DOWN MT(MOD_RCTL, KC_DOWN)
[LAYER_SYMBOLS] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- KC_NO, KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, S(BP_EQL),
- KC_TAB, KC_NO, KC_NO, KC_P4, KEY_5, KC_P6, KC_LEFT, KEY_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO,
- LT_SFT, KC_NO, KC_P0, KC_P1, KC_P2, KC_P3, KC_MUTE, KC_MPLY,KC_PGUP, KC_NO, KC_PGDN, KC_NO, KC_NO, KC_RIGHT_SHIFT,
- KC_TRNS, KC_TRNS, KC_TRNS, LY_SYMBOL,AL_SPC, AL_ENT, LY_SYMBOL,KC_NO, KC_RGUI, KC_TRNS
+ KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, S(BP_EQL),
+ KC_TAB, KC_NO, KC_P4, KEY_5, KC_P6, KC_NO, KC_LEFT, KEY_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO,
+ LT_SFT, KC_NO, KC_P1, KC_P2, KC_P3, KC_NO, KC_MUTE, KC_MPLY,KC_PGUP, KC_NO, KC_PGDN, KC_NO, KC_NO, KC_RIGHT_SHIFT,
+ KC_P0, KC_PDOT, KC_TRNS, LY_SYMBOL,AL_SPC, AL_ENT, LY_SYMBOL,KC_TRNS, KC_RGUI, KC_TRNS
),
};
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/overrides.c b/qmk/keyboards/sofle_choc/keymaps/custom/overrides.c
new file mode 100644
index 0000000..a64db44
--- /dev/null
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/overrides.c
@@ -0,0 +1,46 @@
+#include QMK_KEYBOARD_H
+#include "keymap_bepo.h"
+#include "keycodes.h"
+
+//
+// Override the symbol ° and replace it by `
+// The symbol is still available in the symbol layer with the key just below.
+//
+const key_override_t perc_key_override =
+ ko_make_basic(MOD_MASK_SHIFT, KEY_PRC, LSFT(BP_PERC));
+
+//
+// I don’t care of the mapping CTRL+Ç and using the mod_tap does not work well
+// when I type too fast because of tap-dance, so I remap the pattern here.
+//
+const key_override_t c_key_override =
+ ko_make_basic(MOD_MASK_CTRL, KEY_C, LCTL(BP_C));
+
+// Same here, I want to be able to type '' without triggering the tapdance.
+// And there is no such key combo for Alt+È.
+const key_override_t quote_key_override =
+ ko_make_basic(MOD_MASK_ALT, KEY_EE, RALT(BP_COMM));
+
+// Same here, I override the key W with CTRL because the tapdance activate the
+// caps_word which does not make sense here.
+const key_override_t w_key_override =
+ ko_make_basic(MOD_MASK_CTRL, KEY_W, LCTL(BP_W));
+
+const key_override_t e_key_override =
+ ko_make_basic(MOD_MASK_CTRL, KEY_E, RCTL(BP_E));
+
+// Override the key GUI + MENU and to map the key desktop from the typematrix
+const key_override_t menu_key_override =
+ ko_make_basic(MOD_MASK_GUI, KC_APP, MENU);
+
+
+// This globally defines all key overrides to be used
+const key_override_t **key_overrides = (const key_override_t *[]){
+ &perc_key_override,
+ &c_key_override,
+ &w_key_override,
+ &e_key_override,
+ &quote_key_override,
+ &menu_key_override,
+ NULL
+};
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c
index bd160d2..f0a5dbb 100644
--- a/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c
@@ -152,7 +152,8 @@ void lshift_finished(tap_dance_state_t *state, void *user_data) {
register_code(KC_LEFT_SHIFT);
break;
case TD_SINGLE_TAP:
- register_code(KC_CAPS_LOCK);
+ if (host_keyboard_led_state().caps_lock)
+ register_code(KC_CAPS_LOCK);
break;
default: break;
}
@@ -164,7 +165,8 @@ void lshift_reset(tap_dance_state_t *state, void *user_data) {
unregister_code(KC_LEFT_SHIFT);
break;
case TD_SINGLE_TAP:
- unregister_code(KC_CAPS_LOCK);
+ if (host_keyboard_led_state().caps_lock)
+ unregister_code(KC_CAPS_LOCK);
break;
default: break;
}
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/rules.mk b/qmk/keyboards/sofle_choc/keymaps/custom/rules.mk
index 5edfedd..eca5361 100644
--- a/qmk/keyboards/sofle_choc/keymaps/custom/rules.mk
+++ b/qmk/keyboards/sofle_choc/keymaps/custom/rules.mk
@@ -3,4 +3,4 @@ SPLIT_KEYBOARD = yes
TAP_DANCE_ENABLE = yes
CAPS_WORD_ENABLE = yes
KEY_OVERRIDE_ENABLE = yes
-SRC += quad_tapdance.c keycodes.c
+SRC += quad_tapdance.c keycodes.c overrides.c