aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Igne <git@federicoigne.com>2022-10-02 10:00:05 +0100
committerFederico Igne <git@federicoigne.com>2022-10-02 10:00:05 +0100
commit4d918e58369813477f144cbf556f96a6b61870f7 (patch)
tree2f9337b1b66a3036b0039e557e5ff87f10d86d0b
parent8afd7dc19dc3d82bfdcad7ac4e20341d35003806 (diff)
downloadqmk_firmware-sofle.tar.gz
qmk_firmware-sofle.zip
Add personal changes to Sofle Choc keymapsofle
-rw-r--r--keyboards/sofle/keymaps/choc/config.h35
-rw-r--r--keyboards/sofle/keymaps/choc/keymap.c431
-rw-r--r--keyboards/sofle/keymaps/choc/rules.mk6
-rw-r--r--keyboards/sofle/rev1/config.h1
4 files changed, 326 insertions, 147 deletions
diff --git a/keyboards/sofle/keymaps/choc/config.h b/keyboards/sofle/keymaps/choc/config.h
index 00248c035..7763bbb0a 100644
--- a/keyboards/sofle/keymaps/choc/config.h
+++ b/keyboards/sofle/keymaps/choc/config.h
@@ -2,7 +2,7 @@
2 2
3// Plug USB into the left half of the keyboard 3// Plug USB into the left half of the keyboard
4// see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness 4// see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
5#define MASTER_LEFT 5#define MASTER_RIGHT
6 6
7// Serial comms between halves. Change if using I2C 7// Serial comms between halves. Change if using I2C
8#define USE_SERIAL 8#define USE_SERIAL
@@ -12,6 +12,17 @@
12// Not sure what the disadvantages are / why it isn't on by default 12// Not sure what the disadvantages are / why it isn't on by default
13#define SPLIT_USB_DETECT 13#define SPLIT_USB_DETECT
14 14
15#define TAPPING_TERM 200
16//#define SPLIT_TRANSPORT_MIRROR
17//#define SPLIT_LAYER_STATE_ENABLE
18//#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
19//#define SPLIT_WPM_ENABLE
20
21#define OLED_BRIGHTNESS 120
22#define OLED_TIMEOUT 90000
23
24#define SPLIT_OLED_ENABLE
25
15// RGB Configuration 26// RGB Configuration
16// The pin connected to the data pin of the LEDs 27// The pin connected to the data pin of the LEDs
17#define RGB_DI_PIN D3 28#define RGB_DI_PIN D3
@@ -19,9 +30,13 @@
19#define DRIVER_LED_TOTAL 29 30#define DRIVER_LED_TOTAL 29
20 31
21#define RGB_MATRIX_KEYPRESSES 32#define RGB_MATRIX_KEYPRESSES
22#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_BREATHING 33#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
23// limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. 34// limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
24#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 75 35#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
36#define RGB_MATRIX_STARTUP_HUE 255 // Sets the default hue value, if none has been set
37#define RGB_MATRIX_STARTUP_SAT 192 // Sets the default saturation value, if none has been set
38#define RGB_MATRIX_STARTUP_VAL 100 // Sets the default brightness value, if none has been set
39#define RGB_MATRIX_STARTUP_SPD 100 // Sets the default animation speed, if none has been set
25#define RGB_MATRIX_HUE_STEP 8 40#define RGB_MATRIX_HUE_STEP 8
26#define RGB_MATRIX_SAT_STEP 8 41#define RGB_MATRIX_SAT_STEP 8
27#define RGB_MATRIX_VAL_STEP 8 42#define RGB_MATRIX_VAL_STEP 8
@@ -30,9 +45,9 @@
30// RGB animations. Disable the animations you don't want/need. 45// RGB animations. Disable the animations you don't want/need.
31#define DISABLE_RGB_MATRIX_ALPHAS_MODS 46#define DISABLE_RGB_MATRIX_ALPHAS_MODS
32#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN 47#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
33// #define DISABLE_RGB_MATRIX_BREATHING 48#define DISABLE_RGB_MATRIX_BREATHING
34#define DISABLE_RGB_MATRIX_CYCLE_ALL 49#define DISABLE_RGB_MATRIX_CYCLE_ALL
35#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT 50//#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
36#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN 51#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
37#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN 52#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
38#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL 53#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
@@ -44,11 +59,11 @@
44#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS 59#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
45#define DISABLE_RGB_MATRIX_TYPING_HEATMAP 60#define DISABLE_RGB_MATRIX_TYPING_HEATMAP
46#define DISABLE_RGB_MATRIX_DIGITAL_RAIN 61#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
47// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE 62#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
48// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE 63#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
49// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE 64#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
50// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE 65#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
51// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS 66#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
52#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS 67#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
53#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS 68#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
54#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS 69#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
diff --git a/keyboards/sofle/keymaps/choc/keymap.c b/keyboards/sofle/keymaps/choc/keymap.c
index f1e7a4d0d..120f4e95f 100644
--- a/keyboards/sofle/keymaps/choc/keymap.c
+++ b/keyboards/sofle/keymaps/choc/keymap.c
@@ -1,9 +1,7 @@
1#include QMK_KEYBOARD_H 1#include QMK_KEYBOARD_H
2 2
3enum sofle_layers { 3enum sofle_layers {
4 /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
5 _QWERTY, 4 _QWERTY,
6 _COLEMAK,
7 _LOWER, 5 _LOWER,
8 _RAISE, 6 _RAISE,
9 _ADJUST, 7 _ADJUST,
@@ -11,14 +9,11 @@ enum sofle_layers {
11 9
12enum custom_keycodes { 10enum custom_keycodes {
13 KC_QWERTY = SAFE_RANGE, 11 KC_QWERTY = SAFE_RANGE,
14 KC_COLEMAK,
15 KC_LOWER, 12 KC_LOWER,
16 KC_RAISE, 13 KC_RAISE,
17 KC_ADJUST, 14 KC_ADJUST,
18 KC_PRVWD, 15 KC_PRVWD,
19 KC_NXTWD, 16 KC_NXTWD,
20 KC_LSTRT,
21 KC_LEND,
22 KC_DLINE 17 KC_DLINE
23}; 18};
24 19
@@ -39,36 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 * | | | | |/ / \ \ | | | | | 34 * | | | | |/ / \ \ | | | | |
40 * `----------------------------------' '------''---------------------------' 35 * `----------------------------------' '------''---------------------------'
41 */ 36 */
42
43[_QWERTY] = LAYOUT( \ 37[_QWERTY] = LAYOUT( \
44 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ 38 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, EEP_RST, \
45 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ 39 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NUHS, \
46 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ 40 LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT), \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ 41 LSFT_T(KC_NUBS), KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, \
48 KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_ENT, KC_SPC, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI \ 42 _______, KC_LGUI, KC_LALT, KC_LOWER, KC_BSPC, KC_SPC, KC_RAISE, KC_RALT, KC_RGUI, _______ \
49),
50/*
51 * COLEMAK
52 * ,-----------------------------------------. ,-----------------------------------------.
53 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
54 * |------+------+------+------+------+------| |------+------+------+------+------+------|
55 * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc |
56 * |------+------+------+------+------+------| |------+------+------+------+------+------|
57 * | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
58 * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
59 * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift|
60 * `-----------------------------------------/ / \ \-----------------------------------------'
61 * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
62 * | | | | |/ / \ \ | | | | |
63 * `----------------------------------' '------''---------------------------'
64 */
65
66[_COLEMAK] = LAYOUT( \
67 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \
68 KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
69 KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
70 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
71 KC_LGUI, KC_LALT, KC_LCTRL, KC_LOWER, KC_ENT, KC_SPC, KC_RAISE,KC_RCTRL, KC_RALT, KC_RGUI \
72), 43),
73/* LOWER 44/* LOWER
74 * ,-----------------------------------------. ,-----------------------------------------. 45 * ,-----------------------------------------. ,-----------------------------------------.
@@ -85,11 +56,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
85 * `----------------------------------' '------''---------------------------' 56 * `----------------------------------' '------''---------------------------'
86 */ 57 */
87[_LOWER] = LAYOUT( \ 58[_LOWER] = LAYOUT( \
88 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\ 59 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\
89 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, \ 60 _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, \
90 _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ 61 _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, \
91 _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, \ 62 _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, \
92 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ 63 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
93), 64),
94/* RAISE 65/* RAISE
95 * ,----------------------------------------. ,-----------------------------------------. 66 * ,----------------------------------------. ,-----------------------------------------.
@@ -106,11 +77,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
106 * `----------------------------------' '------''---------------------------' 77 * `----------------------------------' '------''---------------------------'
107 */ 78 */
108[_RAISE] = LAYOUT( \ 79[_RAISE] = LAYOUT( \
109 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, \ 80 KC_F19, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, _______, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, KC_PSCR, \
110 _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD, KC_DLINE, KC_BSPC, \ 81 _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, KC_PRVWD, KC_PGUP, KC_NXTWD, KC_CUT, _______, \
111 _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, \ 82 _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COPY, _______, \
112 _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, \ 83 _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, KC_PASTE, KC_UNDO, \
113 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ 84 _______, KC_PDOT, KC_P0, _______, _______, _______, _______, _______, _______, _______ \
114), 85),
115/* ADJUST 86/* ADJUST
116 * ,-----------------------------------------. ,-----------------------------------------. 87 * ,-----------------------------------------. ,-----------------------------------------.
@@ -127,11 +98,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
127 * `----------------------------------' '------''---------------------------' 98 * `----------------------------------' '------''---------------------------'
128 */ 99 */
129 [_ADJUST] = LAYOUT( \ 100 [_ADJUST] = LAYOUT( \
130 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ 101 RESET, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_TOG, \
131 RESET, XXXXXXX, KC_QWERTY, KC_COLEMAK, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ 102 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
132 XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, \ 103 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
133 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, \ 104 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
134 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ 105 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
135 ) 106 )
136}; 107};
137 108
@@ -166,76 +137,316 @@ led_config_t g_led_config = { {
166 137
167#ifdef OLED_DRIVER_ENABLE 138#ifdef OLED_DRIVER_ENABLE
168 139
140/* 32 * 32 logo */
169static void render_logo(void) { 141static void render_logo(void) {
170 static const char PROGMEM qmk_logo[] = { 142 static const char PROGMEM hell_logo[] = {0x00, 0x80, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x1e, 0x06, 0x00, 0x0c, 0x1c, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x70, 0x60, 0x00, 0xc0, 0xf0, 0x3c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x07, 0x03, 0x01, 0x00, 0xf8, 0xf8, 0x80, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x80, 0xc0, 0xc0, 0x40, 0xc0, 0xc0, 0x80, 0x00, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0x00, 0x08, 0x38, 0x08, 0x00, 0x38, 0x08, 0x30, 0x08, 0x38, 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x1f, 0x1f, 0x00, 0x0f, 0x1f, 0x1a, 0x12, 0x1a, 0x1b, 0x0b, 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
171 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 143
172 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 144 oled_write_raw_P(hell_logo, sizeof(hell_logo));
173 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 145}
174 }; 146
147/* 32 * 14 os logos */
148static const char PROGMEM windows_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00, 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
149
150static const char PROGMEM mac_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
151
152/* Smart Backspace Delete */
153
154bool shift_held = false;
155//static uint16_t held_shift = 0;
156
157/* KEYBOARD PET START */
158
159/* settings */
160# define MIN_WALK_SPEED 10
161# define MIN_RUN_SPEED 40
162
163/* advanced settings */
164# define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
165# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024
166
167/* timers */
168uint32_t anim_timer = 0;
169uint32_t anim_sleep = 0;
170
171/* current frame */
172uint8_t current_frame = 0;
173
174/* status variables */
175int current_wpm = 0;
176led_t led_usb_state;
177
178bool isSneaking = false;
179bool isJumping = false;
180bool showedJump = true;
181
182/* logic */
183static void render_luna(int LUNA_X, int LUNA_Y) {
184 /* Sit */
185 static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */
186 {
187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
188 },
189
190 /* 'sit2', 32x22px */
191 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
192
193 /* Walk */
194 static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */
195 {
196 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
197 },
198
199 /* 'walk2', 32x22px */
200 {
201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
202 }};
203
204 /* Run */
205 static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */
206 {
207 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
208 },
209
210 /* 'run2', 32x22px */
211 {
212 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
213 }};
214
215 /* Bark */
216 static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */
217 {
218 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
219 },
220
221 /* 'bark2', 32x22px */
222 {
223 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
224 }};
225
226 /* Sneak */
227 static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */
228 {
229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
230 },
231
232 /* 'sneak2', 32x22px */
233 {
234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
235 }};
236
237 /* animation */
238 void animate_luna(void) {
239 /* jump */
240 if (isJumping || !showedJump) {
241 /* clear */
242 oled_set_cursor(LUNA_X, LUNA_Y + 2);
243 oled_write(" ", false);
244
245 oled_set_cursor(LUNA_X, LUNA_Y - 1);
246
247 showedJump = true;
248 } else {
249 /* clear */
250 oled_set_cursor(LUNA_X, LUNA_Y - 1);
251 oled_write(" ", false);
252
253 oled_set_cursor(LUNA_X, LUNA_Y);
254 }
255
256 /* switch frame */
257 current_frame = (current_frame + 1) % 2;
258
259 /* current status */
260 if (led_usb_state.caps_lock) {
261 oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE);
262
263 } else if (isSneaking) {
264 oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE);
265
266 } else if (current_wpm <= MIN_WALK_SPEED) {
267 oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE);
268
269 } else if (current_wpm <= MIN_RUN_SPEED) {
270 oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE);
271
272 } else {
273 oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE);
274 }
275 }
276
277
278 /* this fixes the screen on and off bug */
279 if (current_wpm > 0) {
280 oled_on();
281 anim_sleep = timer_read32();
282 } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) {
283 oled_off();
284 return; // fixes the filtering problem (for now)
285 }
286
287 /* animation timer */
288 if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
289 anim_timer = timer_read32();
290 animate_luna();
291 }
292}
293
294/* KEYBOARD PET END */
295
296static void print_logo_narrow(void) {
297 render_logo();
175 298
176 oled_write_P(qmk_logo, false); 299 /* wpm counter */
300 uint8_t n = get_current_wpm();
301 char wpm_str[4];
302 oled_set_cursor(0, 14);
303 wpm_str[3] = '\0';
304 wpm_str[2] = '0' + n % 10;
305 wpm_str[1] = '0' + (n /= 10) % 10;
306 wpm_str[0] = '0' + n / 10;
307 oled_write(wpm_str, false);
308
309 oled_set_cursor(0, 15);
310 oled_write(" wpm", false);
177} 311}
178 312
179static void print_status_narrow(void) { 313static void print_status_narrow(void) {
180 // Print current mode 314 /* Print current mode */
181 oled_write_P(PSTR("\n\n"), false); 315 oled_set_cursor(0, 0);
182 oled_write_ln_P(PSTR("MODE"), false);
183 oled_write_ln_P(PSTR(""), false);
184 if (keymap_config.swap_lctl_lgui) { 316 if (keymap_config.swap_lctl_lgui) {
185 oled_write_ln_P(PSTR("MAC"), false); 317 oled_write_raw_P(mac_logo, sizeof(mac_logo));
186 } else { 318 } else {
187 oled_write_ln_P(PSTR("WIN"), false); 319 oled_write_raw_P(windows_logo, sizeof(windows_logo));
188 } 320 }
189 321
322 oled_set_cursor(0, 3);
323
190 switch (get_highest_layer(default_layer_state)) { 324 switch (get_highest_layer(default_layer_state)) {
191 case _QWERTY: 325 case _QWERTY:
192 oled_write_ln_P(PSTR("Qwrt"), false); 326 oled_write("QWRTY", false);
193 break;
194 case _COLEMAK:
195 oled_write_ln_P(PSTR("Clmk"), false);
196 break; 327 break;
197 default: 328 default:
198 oled_write_P(PSTR("Undef"), false); 329 oled_write("UNDEF", false);
199 } 330 }
200 oled_write_P(PSTR("\n\n"), false); 331
201 // Print current layer 332 oled_set_cursor(0, 5);
202 oled_write_ln_P(PSTR("LAYER"), false); 333
334 /* Print current layer */
335 oled_write("LAYER", false);
336
337 oled_set_cursor(0, 6);
338
203 switch (get_highest_layer(layer_state)) { 339 switch (get_highest_layer(layer_state)) {
204 case _COLEMAK:
205 case _QWERTY: 340 case _QWERTY:
206 oled_write_P(PSTR("Base\n"), false); 341 oled_write("Base ", false);
207 break; 342 break;
208 case _RAISE: 343 case _RAISE:
209 oled_write_P(PSTR("Raise"), false); 344 oled_write("Raise", false);
210 break; 345 break;
211 case _LOWER: 346 case _LOWER:
212 oled_write_P(PSTR("Lower"), false); 347 oled_write("Lower", false);
213 break; 348 break;
214 case _ADJUST: 349 case _ADJUST:
215 oled_write_P(PSTR("Adj\n"), false); 350 oled_write("Adj ", false);
216 break; 351 break;
217 default: 352 default:
218 oled_write_ln_P(PSTR("Undef"), false); 353 oled_write("Undef", false);
219 } 354 }
220 oled_write_P(PSTR("\n\n"), false);
221 led_t led_usb_state = host_keyboard_led_state();
222 oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock);
223}
224 355
225oled_rotation_t oled_init_user(oled_rotation_t rotation) { 356 /* caps lock */
226 if (is_keyboard_master()) { 357 oled_set_cursor(0, 8);
227 return OLED_ROTATION_270; 358 oled_write("CPSLK", led_usb_state.caps_lock);
228 } 359
229 return rotation; 360 /* KEYBOARD PET RENDER START */
361
362 render_luna(0, 13);
363
364 /* KEYBOARD PET RENDER END */
230} 365}
231 366
367oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
368
232void oled_task_user(void) { 369void oled_task_user(void) {
370 /* KEYBOARD PET VARIABLES START */
371
372 current_wpm = get_current_wpm();
373 led_usb_state = host_keyboard_led_state();
374
375 /* KEYBOARD PET VARIABLES END */
376
233 if (is_keyboard_master()) { 377 if (is_keyboard_master()) {
234 print_status_narrow(); 378 print_status_narrow();
235 } else { 379 } else {
236 render_logo(); 380 print_logo_narrow();
237 } 381 }
382 //return false;
238} 383}
384/* static void render_logo(void) { */
385/* static const char PROGMEM qmk_logo[] = { */
386/* 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, */
387/* 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, */
388/* 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 */
389/* }; */
390
391/* oled_write_P(qmk_logo, false); */
392/* } */
393
394/* static void print_status_narrow(void) { */
395/* // Print current mode */
396/* oled_write_P(PSTR("\n\n"), false); */
397/* oled_write_ln_P(PSTR("MODE"), false); */
398/* oled_write_ln_P(PSTR(""), false); */
399/* if (keymap_config.swap_lctl_lgui) { */
400/* oled_write_ln_P(PSTR("MAC"), false); */
401/* } else { */
402/* oled_write_ln_P(PSTR("WIN"), false); */
403/* } */
404
405/* switch (get_highest_layer(default_layer_state)) { */
406/* case _QWERTY: */
407/* oled_write_ln_P(PSTR("Qwrt"), false); */
408/* break; */
409/* default: */
410/* oled_write_P(PSTR("Undef"), false); */
411/* } */
412/* oled_write_P(PSTR("\n\n"), false); */
413/* // Print current layer */
414/* oled_write_ln_P(PSTR("LAYER"), false); */
415/* switch (get_highest_layer(layer_state)) { */
416/* case _QWERTY: */
417/* oled_write_P(PSTR("Base\n"), false); */
418/* break; */
419/* case _RAISE: */
420/* oled_write_P(PSTR("Raise"), false); */
421/* break; */
422/* case _LOWER: */
423/* oled_write_P(PSTR("Lower"), false); */
424/* break; */
425/* case _ADJUST: */
426/* oled_write_P(PSTR("Adj\n"), false); */
427/* break; */
428/* default: */
429/* oled_write_ln_P(PSTR("Undef"), false); */
430/* } */
431/* oled_write_P(PSTR("\n\n"), false); */
432/* led_t led_usb_state = host_keyboard_led_state(); */
433/* oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); */
434/* } */
435
436/* oled_rotation_t oled_init_user(oled_rotation_t rotation) { */
437/* if (is_keyboard_master()) { */
438/* return OLED_ROTATION_270; */
439/* } */
440/* return rotation; */
441/* } */
442
443/* void oled_task_user(void) { */
444/* if (is_keyboard_master()) { */
445/* print_status_narrow(); */
446/* } else { */
447/* render_logo(); */
448/* } */
449/* } */
239 450
240#endif 451#endif
241 452
@@ -246,11 +457,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
246 set_single_persistent_default_layer(_QWERTY); 457 set_single_persistent_default_layer(_QWERTY);
247 } 458 }
248 return false; 459 return false;
249 case KC_COLEMAK:
250 if (record->event.pressed) {
251 set_single_persistent_default_layer(_COLEMAK);
252 }
253 return false;
254 case KC_LOWER: 460 case KC_LOWER:
255 if (record->event.pressed) { 461 if (record->event.pressed) {
256 layer_on(_LOWER); 462 layer_on(_LOWER);
@@ -314,51 +520,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
314 } 520 }
315 } 521 }
316 break; 522 break;
317 case KC_LSTRT:
318 if (record->event.pressed) {
319 if (keymap_config.swap_lctl_lgui) {
320 //CMD-arrow on Mac, but we have CTL and GUI swapped
321 register_mods(mod_config(MOD_LCTL));
322 register_code(KC_LEFT);
323 } else {
324 register_code(KC_HOME);
325 }
326 } else {
327 if (keymap_config.swap_lctl_lgui) {
328 unregister_mods(mod_config(MOD_LCTL));
329 unregister_code(KC_LEFT);
330 } else {
331 unregister_code(KC_HOME);
332 }
333 }
334 break;
335 case KC_LEND:
336 if (record->event.pressed) {
337 if (keymap_config.swap_lctl_lgui) {
338 //CMD-arrow on Mac, but we have CTL and GUI swapped
339 register_mods(mod_config(MOD_LCTL));
340 register_code(KC_RIGHT);
341 } else {
342 register_code(KC_END);
343 }
344 } else {
345 if (keymap_config.swap_lctl_lgui) {
346 unregister_mods(mod_config(MOD_LCTL));
347 unregister_code(KC_RIGHT);
348 } else {
349 unregister_code(KC_END);
350 }
351 }
352 break;
353 case KC_DLINE:
354 if (record->event.pressed) {
355 register_mods(mod_config(MOD_LCTL));
356 register_code(KC_BSPC);
357 } else {
358 unregister_mods(mod_config(MOD_LCTL));
359 unregister_code(KC_BSPC);
360 }
361 break;
362 case KC_COPY: 523 case KC_COPY:
363 if (record->event.pressed) { 524 if (record->event.pressed) {
364 register_mods(mod_config(MOD_LCTL)); 525 register_mods(mod_config(MOD_LCTL));
diff --git a/keyboards/sofle/keymaps/choc/rules.mk b/keyboards/sofle/keymaps/choc/rules.mk
index 31c223dc5..6b1f4e077 100644
--- a/keyboards/sofle/keymaps/choc/rules.mk
+++ b/keyboards/sofle/keymaps/choc/rules.mk
@@ -1,8 +1,10 @@
1SPLIT_KEYBOARD = yes 1SPLIT_KEYBOARD = yes
2OLED_DRIVER_ENABLE = yes
3ENCODER_ENABLE = yes 2ENCODER_ENABLE = yes
4EXTRAKEY_ENABLE = yes 3EXTRAKEY_ENABLE = yes
5 4
5OLED_DRIVER_ENABLE = yes
6OLED_DRIVER = SSD1306
7
6RGB_MATRIX_ENABLE = yes 8RGB_MATRIX_ENABLE = yes
7RGB_MATRIX_DRIVER = WS2812 9RGB_MATRIX_DRIVER = WS2812
8 10
@@ -13,3 +15,5 @@ EXTRAFLAGS += -flto
13# Change keymaps without flashing 15# Change keymaps without flashing
14# https://caniusevia.com/ 16# https://caniusevia.com/
15# VIA_ENABLE = yes 17# VIA_ENABLE = yes
18
19WPM_ENABLE = yes
diff --git a/keyboards/sofle/rev1/config.h b/keyboards/sofle/rev1/config.h
index ab0e0b39d..5fd3747fd 100644
--- a/keyboards/sofle/rev1/config.h
+++ b/keyboards/sofle/rev1/config.h
@@ -17,7 +17,6 @@
17#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } 17#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
18#define DIODE_DIRECTION COL2ROW 18#define DIODE_DIRECTION COL2ROW
19 19
20#define TAPPING_TERM 100
21#define DEBOUNCE 5 20#define DEBOUNCE 5
22 21
23/* encoder support */ 22/* encoder support */