From 722f06ff8c7c77843cc5be14d9fdb7d68a16ebf1 Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Wed, 26 Sep 2018 20:08:56 +0200 Subject: Keymap: Update whitefox/konstantin keymap (#3980) * Rename constexpr keymap folder to konstantin * Replace numpad comma with Unicode comma * Rename tap dance constants * Move record->event.pressed check into switch * Use RShift as a dedicated Fn key --- keyboards/whitefox/keymaps/constexpr/config.h | 14 --- keyboards/whitefox/keymaps/constexpr/keymap.c | 142 ------------------------ keyboards/whitefox/keymaps/constexpr/rules.mk | 4 - keyboards/whitefox/keymaps/konstantin/config.h | 14 +++ keyboards/whitefox/keymaps/konstantin/keymap.c | 146 +++++++++++++++++++++++++ keyboards/whitefox/keymaps/konstantin/rules.mk | 4 + 6 files changed, 164 insertions(+), 160 deletions(-) delete mode 100644 keyboards/whitefox/keymaps/constexpr/config.h delete mode 100644 keyboards/whitefox/keymaps/constexpr/keymap.c delete mode 100644 keyboards/whitefox/keymaps/constexpr/rules.mk create mode 100644 keyboards/whitefox/keymaps/konstantin/config.h create mode 100644 keyboards/whitefox/keymaps/konstantin/keymap.c create mode 100644 keyboards/whitefox/keymaps/konstantin/rules.mk (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/constexpr/config.h b/keyboards/whitefox/keymaps/constexpr/config.h deleted file mode 100644 index b4bc05acf..000000000 --- a/keyboards/whitefox/keymaps/constexpr/config.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#define FORCE_NKRO - -#define TAPPING_TOGGLE 2 -#define TAPPING_TERM 200 -#define PERMISSIVE_HOLD - -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 diff --git a/keyboards/whitefox/keymaps/constexpr/keymap.c b/keyboards/whitefox/keymaps/constexpr/keymap.c deleted file mode 100644 index b19f1c81f..000000000 --- a/keyboards/whitefox/keymaps/constexpr/keymap.c +++ /dev/null @@ -1,142 +0,0 @@ -#include QMK_KEYBOARD_H - -#define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_CTRL TD(TD_FN_CTRL) -#define RL_ALT TD(TD_RL_ALT) // Unused - -#define TOP LCTL(KC_HOME) -#define BOTTOM LCTL(KC_END) - -#define UC_LPRN UC(0x0028) -#define UC_RPRN UC(0x0029) -#define UC_EQLS UC(0x003D) -#define UC_MULS UC(0x00D7) -#define UC_DIVS UC(0x00F7) -#define UC_MINS UC(0x2212) - -void matrix_init_user(void) -{ - set_unicode_input_mode(UC_WIN); -} - -enum layers { - L_BASE, - L_FN, - L_NUMPAD, -}; - -enum custom_keycodes { - CLEAR = SAFE_RANGE, - NUMPAD, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - if (!record->event.pressed) { return true; } - - switch (keycode) { - case CLEAR: - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); - return false; - - case NUMPAD: - layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<count & 1) { layer_on(L_FN); } - if (state->count & 2) { register_code(KC_RCTL); } -} - -void td_fn_ctrl_reset(qk_tap_dance_state_t *state, void *user_data) -{ - if (state->count & 1) { layer_off(L_FN); } - if (state->count & 2) { unregister_code(KC_RCTL); } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_FN_CTRL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_fn_ctrl_finished, td_fn_ctrl_reset), - [TD_RL_ALT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_LALT), // Unused -}; - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base layer - * ,---------------------------------------------------------------. - * |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |PSc| - * |---------------------------------------------------------------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |Bspc |Del| - * |---------------------------------------------------------------| - * |FnCaps| A | S | D | F | G | H | J | K | L | ; | ' | Enter |PgU| - * |---------------------------------------------------------------| - * | LShift | Z | X | C | V | B | N | M | , | . | / |RShift| ↑ |PgD| - * |---------------------------------------------------------------| - * |LCtl|LGui|LAlt| Space |RAlt|FnCt| | ← | ↓ | → | - * `---------------------------------------------------------------' - */ - [L_BASE] = LAYOUT_truefox( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ - 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_RBRC,KC_BSPC, KC_DEL, \ - FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN_CTRL, KC_LEFT,KC_DOWN,KC_RGHT \ - ), - - /* Function layer - * ,---------------------------------------------------------------. - * | |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Num|Scr|Pau| - * |---------------------------------------------------------------| - * | M4 |M2 |M↑ |M1 |M3 |M5 | | | |Stp|Ply|Prv|Nxt|Clear|Ins| - * |---------------------------------------------------------------| - * | |M← |M↓ |M→ |MW↑| | | | | | | | |Top| - * |---------------------------------------------------------------| - * | |MA0|MA2|MW←|MW→| | | |Vo-|Vo+|Mut| |PgU|Btm| - * |---------------------------------------------------------------| - * | | | | MW↓ |App | | |Hom|PgD|End| - * `---------------------------------------------------------------' - */ - [L_FN] = LAYOUT_truefox( \ - _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ - KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,_______,_______,KC_MSTP,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ - _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,_______,_______,_______,_______,_______,_______, _______, TOP, \ - _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______, KC_PGUP,BOTTOM, \ - _______,_______,_______, KC_WH_D, KC_APP, _______, KC_HOME,KC_PGDN,KC_END \ - ), - - /* Numpad layer - * ,---------------------------------------------------------------. - * |Num| | | | | | |P7 |P8 |P9 |P- | − | = |Num| | | - * |---------------------------------------------------------------| - * | | | | | | | |P4 |P5 |P6 |P+ | ( | ) | | | - * |---------------------------------------------------------------| - * | | | | | | | |P1 |P2 |P3 |P* | × | PEnter | | - * |---------------------------------------------------------------| - * | | | | | | |P0 |P0 |P, |P. |P/ | ÷ | | | - * |---------------------------------------------------------------| - * | | | | | | | | | | | - * `---------------------------------------------------------------' - */ - [L_NUMPAD] = LAYOUT_truefox( \ - NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,UC_MINS,UC_EQLS,NUMPAD, _______,_______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,UC_LPRN,UC_RPRN,_______, _______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,UC_MULS, KC_PENT, _______, \ - _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, KC_PCMM,KC_PDOT,KC_PSLS,UC_DIVS, _______,_______, \ - _______,_______,_______, _______, _______,_______, _______,_______,_______ \ - ), -}; diff --git a/keyboards/whitefox/keymaps/constexpr/rules.mk b/keyboards/whitefox/keymaps/constexpr/rules.mk deleted file mode 100644 index f1f3d2378..000000000 --- a/keyboards/whitefox/keymaps/constexpr/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -BOOTMAGIC_ENABLE = no -CONSOLE_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h new file mode 100644 index 000000000..ad40105a7 --- /dev/null +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -0,0 +1,14 @@ +#pragma once + +#define FORCE_NKRO + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 + +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c new file mode 100644 index 000000000..6998798e3 --- /dev/null +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -0,0 +1,146 @@ +#include QMK_KEYBOARD_H + +#define FN MO(L_FN) +#define FN_CAPS LT(L_FN, KC_CAPS) +#define FN_RCTL TD(TD_FN_RCTL) // Unused +#define RLALT TD(TD_RLALT) // Unused + +#define TOP LCTL(KC_HOME) +#define BOTTOM LCTL(KC_END) + +#define UC_COMM UC(0x002C) +#define UC_LPRN UC(0x0028) +#define UC_RPRN UC(0x0029) +#define UC_EQLS UC(0x003D) +#define UC_MULS UC(0x00D7) +#define UC_DIVS UC(0x00F7) +#define UC_MINS UC(0x2212) + +void matrix_init_user(void) +{ + set_unicode_input_mode(UC_WIN); +} + +enum layers { + L_BASE, + L_FN, + L_NUMPAD, +}; + +enum custom_keycodes { + CLEAR = SAFE_RANGE, + NUMPAD, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case CLEAR: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; + + case NUMPAD: + if (record->event.pressed) { + layer_invert(L_NUMPAD); + bool num_lock = host_keyboard_leds() & 1<count & 1) { layer_on(L_FN); } + if (state->count & 2) { register_code(KC_RCTL); } +} + +void td_fn_ctrl_reset(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count & 1) { layer_off(L_FN); } + if (state->count & 2) { unregister_code(KC_RCTL); } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_fn_ctrl_finished, td_fn_ctrl_reset), + [TD_RLALT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_LALT), +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ,---------------------------------------------------------------. + * |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |PSc| + * |---------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |Bspc |Del| + * |---------------------------------------------------------------| + * |FnCaps| A | S | D | F | G | H | J | K | L | ; | ' | Enter |PgU| + * |---------------------------------------------------------------| + * | LShift | Z | X | C | V | B | N | M | , | . | / | Fn | ↑ |PgD| + * |---------------------------------------------------------------| + * |LCtl|LGui|LAlt| Space |RAlt|RCtl| | ← | ↓ | → | + * `---------------------------------------------------------------' + */ + [L_BASE] = LAYOUT_truefox( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ + 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_RBRC,KC_BSPC, KC_DEL, \ + FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,FN, KC_UP, KC_PGDN, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + ), + + /* Function layer + * ,---------------------------------------------------------------. + * | |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Num|Scr|Pau| + * |---------------------------------------------------------------| + * | M4 |M2 |M↑ |M1 |M3 |M5 | | | |Stp|Ply|Prv|Nxt|Clear|Ins| + * |---------------------------------------------------------------| + * | |M← |M↓ |M→ |MW↑| | | | | | | | |Top| + * |---------------------------------------------------------------| + * | |MA0|MA2|MW←|MW→| | | |VoD|VoU|Mut| |PgU|Btm| + * |---------------------------------------------------------------| + * | | | | MW↓ | |Menu| |Hom|PgD|End| + * `---------------------------------------------------------------' + */ + [L_FN] = LAYOUT_truefox( \ + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ + KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,_______,_______,KC_MSTP,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ + _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,_______,_______,_______,_______,_______,_______, _______, TOP, \ + _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______, KC_PGUP,BOTTOM, \ + _______,_______,_______, KC_WH_D, _______,KC_APP, KC_HOME,KC_PGDN,KC_END \ + ), + + /* Numpad layer + * ,---------------------------------------------------------------. + * |Num| | | | | | |P7 |P8 |P9 |P- | − | = |Num| | | + * |---------------------------------------------------------------| + * | | | | | | | |P4 |P5 |P6 |P+ | ( | ) | | | + * |---------------------------------------------------------------| + * | | | | | | | |P1 |P2 |P3 |P* | × | PEnter | | + * |---------------------------------------------------------------| + * | | | | | | |P0 |P0 | , |P. |P/ | ÷ | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | + * `---------------------------------------------------------------' + */ + [L_NUMPAD] = LAYOUT_truefox( \ + NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,UC_MINS,UC_EQLS,NUMPAD, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,UC_LPRN,UC_RPRN,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,UC_MULS, KC_PENT, _______, \ + _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, UC_COMM,KC_PDOT,KC_PSLS,UC_DIVS, _______,_______, \ + _______,_______,_______, _______, _______,_______, _______,_______,_______ \ + ), +}; diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk new file mode 100644 index 000000000..f1f3d2378 --- /dev/null +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -0,0 +1,4 @@ +BOOTMAGIC_ENABLE = no +CONSOLE_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes -- cgit v1.2.3-24-g4f1b From 6c6897f7789f67076ea2f3f9cfe47da814e599fa Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Fri, 19 Oct 2018 17:42:01 +0200 Subject: Keymap: Update whitefox/konstantin keymap (#4169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * td_fn_ctrl_* → td_fn_rctl_* * Swap Fn and RCtrl * Change key combination for Command feature * Replace register/unregister_code call with tap_code * Add virtual desktop controls to keymap * Add/close virtual desktop on Fn+GUI tap dance --- keyboards/whitefox/keymaps/konstantin/config.h | 3 +++ keyboards/whitefox/keymaps/konstantin/keymap.c | 34 ++++++++++++++------------ 2 files changed, 22 insertions(+), 15 deletions(-) (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index ad40105a7..725609b46 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -12,3 +12,6 @@ #define MOUSEKEY_TIME_TO_MAX 50 #define MOUSEKEY_WHEEL_MAX_SPEED 1 #define MOUSEKEY_WHEEL_TIME_TO_MAX 50 + +#undef IS_COMMAND +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index 6998798e3..247bc6bbf 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -2,9 +2,12 @@ #define FN MO(L_FN) #define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_RCTL TD(TD_FN_RCTL) // Unused -#define RLALT TD(TD_RLALT) // Unused +#define FN_RCTL TD(TD_FN_RCTL) // Unused +#define RLALT TD(TD_RLALT) // Unused +#define DESKTOP TD(TD_DESKTOP) +#define DESKT_L LCTL(LGUI(KC_LEFT)) +#define DESKT_R LCTL(LGUI(KC_RGHT)) #define TOP LCTL(KC_HOME) #define BOTTOM LCTL(KC_END) @@ -46,8 +49,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) layer_invert(L_NUMPAD); bool num_lock = host_keyboard_leds() & 1<count & 1) { layer_on(L_FN); } if (state->count & 2) { register_code(KC_RCTL); } } -void td_fn_ctrl_reset(qk_tap_dance_state_t *state, void *user_data) +void td_fn_rctl_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count & 1) { layer_off(L_FN); } if (state->count & 2) { unregister_code(KC_RCTL); } } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_fn_ctrl_finished, td_fn_ctrl_reset), + [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_fn_rctl_finished, td_fn_rctl_reset), [TD_RLALT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_LALT), + [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop }; const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -89,17 +93,17 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------------------------------------------------------------| * |FnCaps| A | S | D | F | G | H | J | K | L | ; | ' | Enter |PgU| * |---------------------------------------------------------------| - * | LShift | Z | X | C | V | B | N | M | , | . | / | Fn | ↑ |PgD| + * | LShift | Z | X | C | V | B | N | M | , | . | / |RCtrl | ↑ |PgD| * |---------------------------------------------------------------| - * |LCtl|LGui|LAlt| Space |RAlt|RCtl| | ← | ↓ | → | + * |LCtl|LGui|LAlt| Space |RAlt| Fn | | ← | ↓ | → | * `---------------------------------------------------------------' */ [L_BASE] = LAYOUT_truefox( \ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ 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_RBRC,KC_BSPC, KC_DEL, \ FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,FN, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RCTL, KC_UP, KC_PGDN, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN, KC_LEFT,KC_DOWN,KC_RGHT \ ), /* Function layer @@ -110,17 +114,17 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------------------------------------------------------------| * | |M← |M↓ |M→ |MW↑| | | | | | | | |Top| * |---------------------------------------------------------------| - * | |MA0|MA2|MW←|MW→| | | |VoD|VoU|Mut| |PgU|Btm| + * | |MA0|MA2|MW←|MW→| | | |VoD|VoU|Mut| App |PgU|Btm| * |---------------------------------------------------------------| - * | | | | MW↓ | |Menu| |Hom|PgD|End| + * | |Dstp|Dst←| MW↓ |Dst→| | |Hom|PgD|End| * `---------------------------------------------------------------' */ [L_FN] = LAYOUT_truefox( \ _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,_______,_______,KC_MSTP,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,_______,_______,_______,_______,_______,_______, _______, TOP, \ - _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______, KC_PGUP,BOTTOM, \ - _______,_______,_______, KC_WH_D, _______,KC_APP, KC_HOME,KC_PGDN,KC_END \ + _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_APP, KC_PGUP,BOTTOM, \ + _______,DESKTOP,DESKT_L, KC_WH_D, DESKT_R,_______, KC_HOME,KC_PGDN,KC_END \ ), /* Numpad layer -- cgit v1.2.3-24-g4f1b From c8267d9fea5e8b0dbdeb8521238c922ff4a83a99 Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Tue, 23 Oct 2018 21:34:06 +0200 Subject: Update whitefox/konstantin keymap (#4220) * Change brace style to QMK OTBS * Change Unicode input mode to UC_WINC * Align constant values in config.h --- keyboards/whitefox/keymaps/konstantin/config.h | 18 +++++++++--------- keyboards/whitefox/keymaps/konstantin/keymap.c | 18 ++++++------------ 2 files changed, 15 insertions(+), 21 deletions(-) (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index 725609b46..39450d680 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -2,16 +2,16 @@ #define FORCE_NKRO -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 #undef IS_COMMAND #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index 247bc6bbf..edb049287 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -19,9 +19,8 @@ #define UC_DIVS UC(0x00F7) #define UC_MINS UC(0x2212) -void matrix_init_user(void) -{ - set_unicode_input_mode(UC_WIN); +void matrix_init_user(void) { + set_unicode_input_mode(UC_WINC); } enum layers { @@ -35,13 +34,10 @@ enum custom_keycodes { NUMPAD, }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case CLEAR: - if (record->event.pressed) { - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); - } + if (record->event.pressed) { SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); } return false; case NUMPAD: @@ -65,15 +61,13 @@ enum tap_dance { TD_DESKTOP, }; -void td_fn_rctl_finished(qk_tap_dance_state_t *state, void *user_data) -{ +void td_fn_rctl_finished(qk_tap_dance_state_t *state, void *user_data) { // Single tap → Fn, double tap → RCtrl, triple tap → Fn+RCtrl etc. if (state->count & 1) { layer_on(L_FN); } if (state->count & 2) { register_code(KC_RCTL); } } -void td_fn_rctl_reset(qk_tap_dance_state_t *state, void *user_data) -{ +void td_fn_rctl_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count & 1) { layer_off(L_FN); } if (state->count & 2) { unregister_code(KC_RCTL); } } -- cgit v1.2.3-24-g4f1b From d1d5f200787f70bb853e32d5e5e2ce7b35ef7a54 Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Mon, 5 Nov 2018 15:04:14 +0100 Subject: Update whitefox/konstantin keymap (#4363) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use Magic+Esc for entering bootloader mode * Expand rules.mk * Improve FN_RCTL tap dance * Avoid one-line if statements * Add PROGMEM to keymaps definition * td_fn_rctl_* → td_fn_rctrl_* * Fix FN_RCTL tap dance bug when count is 4, 8, 12 etc. * Add ACTION_TAP_DANCE_DOUBLE_MODS * Rearrange/rename keycode defines * Use RAL_RGU and RCT_RSF in keymaps * Replace keymap ASCII art with box drawing characters * Add FN_FNLK and use it * Set Unicode input mode in eeconfig_init_user instead of matrix_init_user --- keyboards/whitefox/keymaps/konstantin/config.h | 9 +- keyboards/whitefox/keymaps/konstantin/keymap.c | 202 ++++++++++++++++--------- keyboards/whitefox/keymaps/konstantin/rules.mk | 6 + 3 files changed, 142 insertions(+), 75 deletions(-) (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index 39450d680..d1c3002d2 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -2,6 +2,12 @@ #define FORCE_NKRO +#undef IS_COMMAND +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) + +#define MAGIC_KEY_LAYER0_ALT1 BSLS +#define MAGIC_KEY_BOOTLOADER ESC + #define MOUSEKEY_DELAY 50 #define MOUSEKEY_INTERVAL 15 #define MOUSEKEY_MAX_SPEED 4 @@ -12,6 +18,3 @@ #define PERMISSIVE_HOLD #define TAPPING_TERM 200 #define TAPPING_TOGGLE 2 - -#undef IS_COMMAND -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index edb049287..6732d9a01 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -1,25 +1,29 @@ #include QMK_KEYBOARD_H -#define FN MO(L_FN) -#define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_RCTL TD(TD_FN_RCTL) // Unused -#define RLALT TD(TD_RLALT) // Unused -#define DESKTOP TD(TD_DESKTOP) - -#define DESKT_L LCTL(LGUI(KC_LEFT)) -#define DESKT_R LCTL(LGUI(KC_RGHT)) #define TOP LCTL(KC_HOME) #define BOTTOM LCTL(KC_END) +#define DSKTP_L LCTL(LGUI(KC_LEFT)) +#define DSKTP_R LCTL(LGUI(KC_RGHT)) -#define UC_COMM UC(0x002C) -#define UC_LPRN UC(0x0028) -#define UC_RPRN UC(0x0029) -#define UC_EQLS UC(0x003D) -#define UC_MULS UC(0x00D7) -#define UC_DIVS UC(0x00F7) -#define UC_MINS UC(0x2212) +#define FN MO(L_FN) +#define FN_CAPS LT(L_FN, KC_CAPS) +#define FN_FNLK TT(L_FN) -void matrix_init_user(void) { +#define DESKTOP TD(TD_DESKTOP) +#define FN_RCTL TD(TD_FN_RCTL) +#define RAL_LAL TD(TD_RAL_LAL) +#define RAL_RGU TD(TD_RAL_RGU) +#define RCT_RSF TD(TD_RCT_RSF) + +#define COMMA UC(0x002C) +#define L_PAREN UC(0x0028) +#define R_PAREN UC(0x0029) +#define EQUALS UC(0x003D) +#define TIMES UC(0x00D7) +#define DIVIDE UC(0x00F7) +#define MINUS UC(0x2212) + +void eeconfig_init_user(void) { set_unicode_input_mode(UC_WINC); } @@ -37,7 +41,9 @@ enum custom_keycodes { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case CLEAR: - if (record->event.pressed) { SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); } + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } return false; case NUMPAD: @@ -55,90 +61,142 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } -enum tap_dance { - TD_FN_RCTL, - TD_RLALT, - TD_DESKTOP, -}; +struct { + bool fn_on; // Layer state when tap dance started + bool started; +} td_fn_rctrl_data; + +void td_fn_rctrl_each(qk_tap_dance_state_t *state, void *user_data) { + if (!td_fn_rctrl_data.started) { + td_fn_rctrl_data.fn_on = IS_LAYER_ON(L_FN); + td_fn_rctrl_data.started = true; + } + // Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl + if (state->count == 1 || state->count == 3) { + layer_on(L_FN); + } else if (state->count == 2) { + if (!td_fn_rctrl_data.fn_on) { + layer_off(L_FN); + } + register_code(KC_RCTL); + } +} + +void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { + if ((state->count == 1 || state->count > 2) && !td_fn_rctrl_data.fn_on) { + layer_off(L_FN); + } + if (state->count >= 2) { + unregister_code(KC_RCTL); + } + td_fn_rctrl_data.started = false; +} + +#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ + .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ + .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ + } -void td_fn_rctl_finished(qk_tap_dance_state_t *state, void *user_data) { - // Single tap → Fn, double tap → RCtrl, triple tap → Fn+RCtrl etc. - if (state->count & 1) { layer_on(L_FN); } - if (state->count & 2) { register_code(KC_RCTL); } +void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 + if (state->count == 1 || state->count == 3) { + register_code(mods->kc1); + } else if (state->count == 2) { + unregister_code(mods->kc1); + register_code(mods->kc2); + } + // Prevent tap dance from sending kc1 and kc2 as weak mods + state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); } -void td_fn_rctl_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count & 1) { layer_off(L_FN); } - if (state->count & 2) { unregister_code(KC_RCTL); } +void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + if (state->count == 1 || state->count > 2) { + unregister_code(mods->kc1); + } + if (state->count >= 2) { + unregister_code(mods->kc2); + } } +enum tap_dance { + TD_DESKTOP, + TD_FN_RCTL, + TD_RAL_LAL, + TD_RAL_RGU, + TD_RCT_RSF, +}; + qk_tap_dance_action_t tap_dance_actions[] = { - [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_fn_rctl_finished, td_fn_rctl_reset), - [TD_RLALT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_LALT), [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop + [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), + [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), + [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), + [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), }; -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base layer - * ,---------------------------------------------------------------. - * |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |PSc| - * |---------------------------------------------------------------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |Bspc |Del| - * |---------------------------------------------------------------| - * |FnCaps| A | S | D | F | G | H | J | K | L | ; | ' | Enter |PgU| - * |---------------------------------------------------------------| - * | LShift | Z | X | C | V | B | N | M | , | . | / |RCtrl | ↑ |PgD| - * |---------------------------------------------------------------| - * |LCtl|LGui|LAlt| Space |RAlt| Fn | | ← | ↓ | → | - * `---------------------------------------------------------------' + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │CtlSft│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │AlGu│FnLk│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ 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_RBRC,KC_BSPC, KC_DEL, \ FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RCTL, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RCT_RSF, KC_UP, KC_PGDN, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, RAL_RGU,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ ), /* Function layer - * ,---------------------------------------------------------------. - * | |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Num|Scr|Pau| - * |---------------------------------------------------------------| - * | M4 |M2 |M↑ |M1 |M3 |M5 | | | |Stp|Ply|Prv|Nxt|Clear|Ins| - * |---------------------------------------------------------------| - * | |M← |M↓ |M→ |MW↑| | | | | | | | |Top| - * |---------------------------------------------------------------| - * | |MA0|MA2|MW←|MW→| | | |VoD|VoU|Mut| App |PgU|Btm| - * |---------------------------------------------------------------| - * | |Dstp|Dst←| MW↓ |Dst→| | |Hom|PgD|End| - * `---------------------------------------------------------------' + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│Scr│Pau│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │Stp│Ply│Prv│Nxt│Clear│Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ App │PgU│Btm│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │Dstp│Dst←│ MW↓ │Dst→│ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_FN] = LAYOUT_truefox( \ _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,_______,_______,KC_MSTP,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,_______,_______,_______,_______,_______,_______, _______, TOP, \ _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_APP, KC_PGUP,BOTTOM, \ - _______,DESKTOP,DESKT_L, KC_WH_D, DESKT_R,_______, KC_HOME,KC_PGDN,KC_END \ + _______,DESKTOP,DSKTP_L, KC_WH_D, DSKTP_R,_______, KC_HOME,KC_PGDN,KC_END \ ), /* Numpad layer - * ,---------------------------------------------------------------. - * |Num| | | | | | |P7 |P8 |P9 |P- | − | = |Num| | | - * |---------------------------------------------------------------| - * | | | | | | | |P4 |P5 |P6 |P+ | ( | ) | | | - * |---------------------------------------------------------------| - * | | | | | | | |P1 |P2 |P3 |P* | × | PEnter | | - * |---------------------------------------------------------------| - * | | | | | | |P0 |P0 | , |P. |P/ | ÷ | | | - * |---------------------------------------------------------------| - * | | | | | | | | | | | - * `---------------------------------------------------------------' + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Num│ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_NUMPAD] = LAYOUT_truefox( \ - NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,UC_MINS,UC_EQLS,NUMPAD, _______,_______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,UC_LPRN,UC_RPRN,_______, _______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,UC_MULS, KC_PENT, _______, \ - _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, UC_COMM,KC_PDOT,KC_PSLS,UC_DIVS, _______,_______, \ + NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,MINUS, EQUALS, NUMPAD, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,L_PAREN,R_PAREN,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,TIMES, KC_PENT, _______, \ + _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, COMMA, KC_PDOT,KC_PSLS,DIVIDE, _______,_______, \ _______,_______,_______, _______, _______,_______, _______,_______,_______ \ ), }; diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index f1f3d2378..abf92c2c4 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,4 +1,10 @@ +BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes +VISUALIZER_ENABLE = no -- cgit v1.2.3-24-g4f1b From 29dd6645898d1647c5e4326c9851c2f1562bb6a0 Mon Sep 17 00:00:00 2001 From: Danilo Vulicevic Date: Tue, 6 Nov 2018 21:03:33 +0100 Subject: Add whitefox/billypython keymap (#4374) * Add keyboards/whitefox/keymaps/billypython Cloned from vomindoraan/qmk_firmware * Customize keymap for Linux --- keyboards/whitefox/keymaps/billypython/config.h | 20 +++ keyboards/whitefox/keymaps/billypython/keymap.c | 205 ++++++++++++++++++++++++ keyboards/whitefox/keymaps/billypython/rules.mk | 10 ++ 3 files changed, 235 insertions(+) create mode 100644 keyboards/whitefox/keymaps/billypython/config.h create mode 100644 keyboards/whitefox/keymaps/billypython/keymap.c create mode 100644 keyboards/whitefox/keymaps/billypython/rules.mk (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/billypython/config.h b/keyboards/whitefox/keymaps/billypython/config.h new file mode 100644 index 000000000..d1c3002d2 --- /dev/null +++ b/keyboards/whitefox/keymaps/billypython/config.h @@ -0,0 +1,20 @@ +#pragma once + +#define FORCE_NKRO + +#undef IS_COMMAND +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) + +#define MAGIC_KEY_LAYER0_ALT1 BSLS +#define MAGIC_KEY_BOOTLOADER ESC + +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 diff --git a/keyboards/whitefox/keymaps/billypython/keymap.c b/keyboards/whitefox/keymaps/billypython/keymap.c new file mode 100644 index 000000000..8096885cf --- /dev/null +++ b/keyboards/whitefox/keymaps/billypython/keymap.c @@ -0,0 +1,205 @@ +#include QMK_KEYBOARD_H + +#define TOP LCTL(KC_HOME) +#define BOTTOM LCTL(KC_END) +#define DSKTP_L LCTL(LGUI(KC_LEFT)) +#define DSKTP_R LCTL(LGUI(KC_RGHT)) + +#define FN MO(L_FN) +#define FN_CAPS LT(L_FN, KC_CAPS) +#define FN_FNLK TT(L_FN) + +#define DESKTOP TD(TD_DESKTOP) +#define FN_RCTL TD(TD_FN_RCTL) +#define RAL_LAL TD(TD_RAL_LAL) +#define RAL_RGU TD(TD_RAL_RGU) +#define RCT_RSF TD(TD_RCT_RSF) +#define RSF_RCT TD(TD_RSF_RCT) + +#define COMMA UC(0x002C) +#define L_PAREN UC(0x0028) +#define R_PAREN UC(0x0029) +#define EQUALS UC(0x003D) +#define TIMES UC(0x00D7) +#define DIVIDE UC(0x00F7) +#define MINUS UC(0x2212) + +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_LNX); +} + +enum layers { + L_BASE, + L_FN, + L_NUMPAD, +}; + +enum custom_keycodes { + CLEAR = SAFE_RANGE, + NUMPAD, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CLEAR: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; + + case NUMPAD: + if (record->event.pressed) { + layer_invert(L_NUMPAD); + bool num_lock = host_keyboard_leds() & 1<count == 1 || state->count == 3) { + layer_on(L_FN); + } else if (state->count == 2) { + if (!td_fn_rctrl_data.fn_on) { + layer_off(L_FN); + } + register_code(KC_RCTL); + } +} + +void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { + if ((state->count == 1 || state->count > 2) && !td_fn_rctrl_data.fn_on) { + layer_off(L_FN); + } + if (state->count >= 2) { + unregister_code(KC_RCTL); + } + td_fn_rctrl_data.started = false; +} + +#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ + .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ + .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ + } + +void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 + if (state->count == 1 || state->count == 3) { + register_code(mods->kc1); + } else if (state->count == 2) { + unregister_code(mods->kc1); + register_code(mods->kc2); + } + // Prevent tap dance from sending kc1 and kc2 as weak mods + state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); +} + +void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + if (state->count == 1 || state->count > 2) { + unregister_code(mods->kc1); + } + if (state->count >= 2) { + unregister_code(mods->kc2); + } +} + +enum tap_dance { + TD_DESKTOP, + TD_FN_RCTL, + TD_RAL_LAL, + TD_RAL_RGU, + TD_RCT_RSF, + TD_RSF_RCT, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop + [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), + [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), + [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), + [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), + [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │SftCtl│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │AlGu│FnLk│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_BASE] = LAYOUT_truefox( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ + 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_RBRC,KC_BSPC, KC_DEL, \ + FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RSF_RCT, KC_UP, KC_PGDN, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, RAL_RGU,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│Scr│Pau│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │PgU│ ↑ │PgD│Ply│Prv│Nxt│Clear│Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │M← │M↓ │M→ │MW↑│ │Hom│ ← │ ↓ │ → │End│ │ │Top│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ App │PgU│Btm│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ MW↓ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_FN] = LAYOUT_truefox( \ + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ + KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,KC_PGUP,KC_UP, KC_PGDN,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ + _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, _______, _______, TOP, \ + _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_APP, KC_PGUP,BOTTOM, \ + _______,_______,_______, KC_WH_D, _______,_______, KC_HOME,KC_PGDN,KC_END \ + ), + + /* Numpad layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Num│ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_NUMPAD] = LAYOUT_truefox( \ + NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,MINUS, EQUALS, NUMPAD, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,L_PAREN,R_PAREN,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,TIMES, KC_PENT, _______, \ + _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, COMMA, KC_PDOT,KC_PSLS,DIVIDE, _______,_______, \ + _______,_______,_______, _______, _______,_______, _______,_______,_______ \ + ), +}; diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk new file mode 100644 index 000000000..abf92c2c4 --- /dev/null +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes +VISUALIZER_ENABLE = no -- cgit v1.2.3-24-g4f1b From a30dd2bb1711f5402007adf89af9b3adb758a7fb Mon Sep 17 00:00:00 2001 From: Danilo Vulicevic Date: Wed, 7 Nov 2018 02:04:02 +0100 Subject: Add xd75/billypython keymap (#4381) * Add xd75/billypython keymap * Expand rules.mk (cherry picked from commit 806fee94ae3a21b6ca7a34624101349b57d41b75) * Expand billypython's rules.mk * Remove unused stuff in whitefox/billypython --- keyboards/whitefox/keymaps/billypython/config.h | 3 -- keyboards/whitefox/keymaps/billypython/keymap.c | 52 +------------------------ keyboards/whitefox/keymaps/billypython/rules.mk | 5 +++ keyboards/whitefox/keymaps/konstantin/rules.mk | 5 +++ 4 files changed, 12 insertions(+), 53 deletions(-) (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/billypython/config.h b/keyboards/whitefox/keymaps/billypython/config.h index d1c3002d2..275f8effb 100644 --- a/keyboards/whitefox/keymaps/billypython/config.h +++ b/keyboards/whitefox/keymaps/billypython/config.h @@ -2,9 +2,6 @@ #define FORCE_NKRO -#undef IS_COMMAND -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) - #define MAGIC_KEY_LAYER0_ALT1 BSLS #define MAGIC_KEY_BOOTLOADER ESC diff --git a/keyboards/whitefox/keymaps/billypython/keymap.c b/keyboards/whitefox/keymaps/billypython/keymap.c index 8096885cf..dfc7d6a96 100644 --- a/keyboards/whitefox/keymaps/billypython/keymap.c +++ b/keyboards/whitefox/keymaps/billypython/keymap.c @@ -2,18 +2,11 @@ #define TOP LCTL(KC_HOME) #define BOTTOM LCTL(KC_END) -#define DSKTP_L LCTL(LGUI(KC_LEFT)) -#define DSKTP_R LCTL(LGUI(KC_RGHT)) #define FN MO(L_FN) #define FN_CAPS LT(L_FN, KC_CAPS) #define FN_FNLK TT(L_FN) -#define DESKTOP TD(TD_DESKTOP) -#define FN_RCTL TD(TD_FN_RCTL) -#define RAL_LAL TD(TD_RAL_LAL) -#define RAL_RGU TD(TD_RAL_RGU) -#define RCT_RSF TD(TD_RCT_RSF) #define RSF_RCT TD(TD_RSF_RCT) #define COMMA UC(0x002C) @@ -62,37 +55,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } -struct { - bool fn_on; // Layer state when tap dance started - bool started; -} td_fn_rctrl_data; - -void td_fn_rctrl_each(qk_tap_dance_state_t *state, void *user_data) { - if (!td_fn_rctrl_data.started) { - td_fn_rctrl_data.fn_on = IS_LAYER_ON(L_FN); - td_fn_rctrl_data.started = true; - } - // Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl - if (state->count == 1 || state->count == 3) { - layer_on(L_FN); - } else if (state->count == 2) { - if (!td_fn_rctrl_data.fn_on) { - layer_off(L_FN); - } - register_code(KC_RCTL); - } -} - -void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { - if ((state->count == 1 || state->count > 2) && !td_fn_rctrl_data.fn_on) { - layer_off(L_FN); - } - if (state->count >= 2) { - unregister_code(KC_RCTL); - } - td_fn_rctrl_data.started = false; -} - #define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ @@ -122,20 +84,10 @@ void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { } enum tap_dance { - TD_DESKTOP, - TD_FN_RCTL, - TD_RAL_LAL, - TD_RAL_RGU, - TD_RCT_RSF, TD_RSF_RCT, }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop - [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), - [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), - [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), - [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), }; @@ -150,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │SftCtl│ ↑ │PgD│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │LCtl│LGui│LAlt│ Space │AlGu│FnLk│ │ ← │ ↓ │ → │ + * │LCtl│LGui│LAlt│ Space │RAlt│FnLk│ │ ← │ ↓ │ → │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ @@ -158,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_RBRC,KC_BSPC, KC_DEL, \ FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RSF_RCT, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, RAL_RGU,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ ), /* Function layer diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index abf92c2c4..c42f6e705 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -1,10 +1,15 @@ +AUDIO_ENABLE = no BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes +MIDI_ENABLE = no MOUSEKEY_ENABLE = yes NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SLEEP_LIGHT_ENABLE = no TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes VISUALIZER_ENABLE = no diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index abf92c2c4..c42f6e705 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,10 +1,15 @@ +AUDIO_ENABLE = no BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes +MIDI_ENABLE = no MOUSEKEY_ENABLE = yes NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SLEEP_LIGHT_ENABLE = no TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes VISUALIZER_ENABLE = no -- cgit v1.2.3-24-g4f1b From 945dd946ab2679882b7cd923013ce5424f8f33b4 Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Wed, 7 Nov 2018 18:29:57 +0100 Subject: Fix misspelled make option, format rules.mk files (#4382) --- keyboards/whitefox/keymaps/billypython/rules.mk | 28 ++++++++++++------------- keyboards/whitefox/keymaps/konstantin/rules.mk | 28 ++++++++++++------------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index c42f6e705..8fbc1f3af 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -1,15 +1,15 @@ -AUDIO_ENABLE = no -BACKLIGHT_ENABLE = no -BLUETOOTH_ENABLE = no -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MIDI_ENABLE = no -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -RGBLIGHT_ENABLE = no -SLEEP_LIGHT_ENABLE = no -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MIDI_ENABLE = no +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SLEEP_LED_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes VISUALIZER_ENABLE = no diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index c42f6e705..8fbc1f3af 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,15 +1,15 @@ -AUDIO_ENABLE = no -BACKLIGHT_ENABLE = no -BLUETOOTH_ENABLE = no -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MIDI_ENABLE = no -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -RGBLIGHT_ENABLE = no -SLEEP_LIGHT_ENABLE = no -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MIDI_ENABLE = no +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SLEEP_LED_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes VISUALIZER_ENABLE = no -- cgit v1.2.3-24-g4f1b From defcfb4953d49a0fc72ecf49faeac0534aafc190 Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Fri, 16 Nov 2018 17:55:37 +0100 Subject: Update whitefox/konstantin keymap (#4436) * Add more spacing in keymaps * Enable link-time optimization * Disable deprecated TMK actions, change spacing in config.h * Remove unrelated rules.mk options --- keyboards/whitefox/keymaps/konstantin/config.h | 19 +++++++++------- keyboards/whitefox/keymaps/konstantin/keymap.c | 30 +++++++++++++------------- keyboards/whitefox/keymaps/konstantin/rules.mk | 6 ++---- 3 files changed, 28 insertions(+), 27 deletions(-) (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index d1c3002d2..ee30dbece 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -5,15 +5,18 @@ #undef IS_COMMAND #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC +#define MAGIC_KEY_LAYER0_ALT1 BSLS +#define MAGIC_KEY_BOOTLOADER ESC -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 + +#define NO_ACTION_FUNCTION +#define NO_ACTION_MACRO #define PERMISSIVE_HOLD #define TAPPING_TERM 200 diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index 6732d9a01..55db5ca6b 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -151,11 +151,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ - 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_RBRC,KC_BSPC, KC_DEL, \ - FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RCT_RSF, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, RAL_RGU,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, \ + 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_RBRC, KC_BSPC, KC_DEL, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_RSF, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* Function layer @@ -172,11 +172,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_FN] = LAYOUT_truefox( \ - _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ - KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,_______,_______,KC_MSTP,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ - _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,_______,_______,_______,_______,_______,_______, _______, TOP, \ - _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_APP, KC_PGUP,BOTTOM, \ - _______,DESKTOP,DSKTP_L, KC_WH_D, DSKTP_R,_______, KC_HOME,KC_PGDN,KC_END \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, \ + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \ + _______, DESKTOP, DSKTP_L, KC_WH_D, DSKTP_R, _______, KC_HOME, KC_PGDN, KC_END \ ), /* Numpad layer @@ -193,10 +193,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_NUMPAD] = LAYOUT_truefox( \ - NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,MINUS, EQUALS, NUMPAD, _______,_______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,L_PAREN,R_PAREN,_______, _______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,TIMES, KC_PENT, _______, \ - _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, COMMA, KC_PDOT,KC_PSLS,DIVIDE, _______,_______, \ - _______,_______,_______, _______, _______,_______, _______,_______,_______ \ + NUMPAD, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, NUMPAD, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, KC_PENT, _______, \ + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 8fbc1f3af..96722d1d5 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,15 +1,13 @@ -AUDIO_ENABLE = no BACKLIGHT_ENABLE = no -BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes -MIDI_ENABLE = no MOUSEKEY_ENABLE = yes NKRO_ENABLE = yes -RGBLIGHT_ENABLE = no SLEEP_LED_ENABLE = no TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes VISUALIZER_ENABLE = no + +EXTRAFLAGS += -flto -- cgit v1.2.3-24-g4f1b From fdeec296369c0995bad1117e50946b2df84f35e4 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 19 Dec 2018 08:39:24 -0800 Subject: Overhaul Unicode Common functionality (#4325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Standardize the Unicode EEPROM code * Remove unicode init from process_record_* functions * Add unicode init to where it belongs: matrix_init_quantum * Move Unicode proccessing to unicode common * Add audio feedback to input mode keys to drive konstantin up a wall * Tap_code cleanup * Update keycodes * Update unicode documentation * Update unicode keycodes for consistency/easier merge * Add Audio Feedback section * Remove Functions from feature page And link to the file instead. Link to specific lines later on. * Fix spacing Co-Authored-By: drashna * Because I missed it! Co-Authored-By: drashna * Fix spacing Co-Authored-By: drashna * SPAAAAAAAAAACing Co-Authored-By: drashna * Add BSD for future compatibility * Thought I fixed that! Co-Authored-By: drashna * non-breaking Co-Authored-By: drashna * Considered that Co-Authored-By: drashna * Yuuup Co-Authored-By: drashna * consistency Co-Authored-By: drashna * white spaces .... copied from elsewhere Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * Update keycode defines * Fix Linux Song * Update all of the songs * Cleanup * Move and update check to ensure only one unicode method is enabled * Update quantum/quantum_keycodes.h * Update documentation * Wordsmithing and cleanup * Format unicode_common (#13) * case alignment * process_record_unicode_common → process_unicode_common * Move song arrays into function where they're used, align preprocessor directives * Swap the order of UC_WIN and UC_BSD * Update Unicode docs * Reorder Unicode mode stuff to match the order of input mode constants * Fix capitalization in doc subtitle * Readd BSD and OSX_RALT songs * Reword BSD note in docs * Readd BSD keycode description * Reword explanation of input on different platforms * Steal vomindoraan's input mode documentation Co-Authored-By: vomindoraan (vomindoraan@gmail.com) * Willingly give Drashna the rest of my Unicode doc improvements * Wordsmithing Co-Authored-By: drashna * remove merge artifacts * Unicode common cleanup (#17) * Standardize the Unicode EEPROM code * Remove unicode init from process_record_* functions * Add unicode init to where it belongs: matrix_init_quantum * Move Unicode proccessing to unicode common * Add audio feedback to input mode keys to drive konstantin up a wall * Tap_code cleanup * Update keycodes * Update unicode documentation * Update unicode keycodes for consistency/easier merge * Add Audio Feedback section * Remove Functions from feature page And link to the file instead. Link to specific lines later on. * Fix white spaces Co-Authored-By: drashna * Fix spacing Co-Authored-By: drashna * Because I missed it! Co-Authored-By: drashna * Fix spacing Co-Authored-By: drashna * SPAAAAAAAAAACing Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * Add BSD for future compatibility * Thought I fixed that! Co-Authored-By: drashna * non-breaking Co-Authored-By: drashna * Considered that Co-Authored-By: drashna * Yuuup Co-Authored-By: drashna * consistency Co-Authored-By: drashna * white spaces .... copied from elsewhere Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * Update keycode defines * Fix Linux Song * Update all of the songs * Cleanup * Move and update check to ensure only one unicode method is enabled * Update quantum/quantum_keycodes.h * Update documentation * Wordsmithing and cleanup * Format unicode_common (#13) * case alignment * process_record_unicode_common → process_unicode_common * Move song arrays into function where they're used, align preprocessor directives * Swap the order of UC_WIN and UC_BSD * Update Unicode docs * Reorder Unicode mode stuff to match the order of input mode constants * Fix capitalization in doc subtitle * Readd BSD and OSX_RALT songs * Reword BSD note in docs * Readd BSD keycode description * Reword explanation of input on different platforms * Steal vomindoraan's input mode documentation Co-Authored-By: vomindoraan (vomindoraan@gmail.com) * Willingly give Drashna the rest of my Unicode doc improvements * Wordsmithing Co-Authored-By: drashna * Rearrange process_unicode_common functions * Make Unicode input mode constants (UC_*) an enum * Simplify unicode_input_start/finish code * Make the key used for WinCompose configurable * Remove UC_OSX_RALT in favor of setting the key with UNICODE_OSX_KEY * Update Unicode input mode doc * Add descriptions and rearrange definitions in process_unicode_common.h * Add registry command to Unicode docs + misc updates * Reword an explanation in Unicode docs * Add TODO comment * Remove trailing whitespace * Improve Cycling documentation * Add Unicode Input method Cycling support (#19) * Standardize the Unicode EEPROM code * Remove unicode init from process_record_* functions * Add unicode init to where it belongs: matrix_init_quantum * Move Unicode proccessing to unicode common * Add audio feedback to input mode keys to drive konstantin up a wall * Tap_code cleanup * Update keycodes * Update unicode documentation * Update unicode keycodes for consistency/easier merge * Add Audio Feedback section * Remove Functions from feature page And link to the file instead. Link to specific lines later on. * Fix white spaces Co-Authored-By: drashna * Fix spacing Co-Authored-By: drashna * Because I missed it! Co-Authored-By: drashna * Fix spacing Co-Authored-By: drashna * SPAAAAAAAAAACing Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * Add BSD for future compatibility * Thought I fixed that! Co-Authored-By: drashna * non-breaking Co-Authored-By: drashna * Considered that Co-Authored-By: drashna * Yuuup Co-Authored-By: drashna * consistency Co-Authored-By: drashna * white spaces .... copied from elsewhere Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * white spaces Co-Authored-By: drashna * Update keycode defines * Fix Linux Song * Update all of the songs * Cleanup * Move and update check to ensure only one unicode method is enabled * Update quantum/quantum_keycodes.h * Update documentation * Wordsmithing and cleanup * Format unicode_common (#13) * case alignment * process_record_unicode_common → process_unicode_common * Move song arrays into function where they're used, align preprocessor directives * Swap the order of UC_WIN and UC_BSD * Update Unicode docs * Reorder Unicode mode stuff to match the order of input mode constants * Fix capitalization in doc subtitle * Readd BSD and OSX_RALT songs * Reword BSD note in docs * Readd BSD keycode description * Reword explanation of input on different platforms * Steal vomindoraan's input mode documentation Co-Authored-By: vomindoraan (vomindoraan@gmail.com) * Willingly give Drashna the rest of my Unicode doc improvements * Wordsmithing Co-Authored-By: drashna * Rearrange process_unicode_common functions * Make Unicode input mode constants (UC_*) an enum * Simplify unicode_input_start/finish code * Make the key used for WinCompose configurable * Remove UC_OSX_RALT in favor of setting the key with UNICODE_OSX_KEY * Update Unicode input mode doc * Add descriptions and rearrange definitions in process_unicode_common.h * Add registry command to Unicode docs + misc updates * Reword an explanation in Unicode docs * Add TODO comment * Add cycle_unicode_input_mode and UNICODE_SELECTED_MODES macro * Add an option for making cycle changes persistent * Add debug prints to functions that change input_mode * Use cycle_unicode_input_mode in whitefox/konstantin * Add persist_unicode_input_mode function * Add offset to cycle to allow stepping in reverse * Add keycodes: UNICODE_MODE_FORWARD, UNICODE_MODE_REVERSE Aliases: UC_MOD, UC_RMOD (respectively) * REVERT ME: Undo changes to whitefox/konstantin to avoid conflicts * Fix wrong constant name * Revert "REVERT ME: Undo changes to whitefox/konstantin to avoid conflicts" This reverts commit 42676bf251fc8e3823f5e614dad6e510ba47a2f3. * Change dprintf text * Give selected modes priority over EEPROM when !UNICODE_CYCLE_PERSIST * Remove trailing whitespace * Cleanup of RALT code and unicode compilation stuff * Remove else for unicode handling --- keyboards/whitefox/keymaps/konstantin/config.h | 4 ++++ keyboards/whitefox/keymaps/konstantin/keymap.c | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards/whitefox/keymaps') diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index ee30dbece..ab920a50b 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -21,3 +21,7 @@ #define PERMISSIVE_HOLD #define TAPPING_TERM 200 #define TAPPING_TOGGLE 2 + +#define UNICODE_CYCLE_PERSIST false +#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX +#define UNICODE_WINC_KEY KC_RGUI diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index 55db5ca6b..54777cfe0 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -23,10 +23,6 @@ #define DIVIDE UC(0x00F7) #define MINUS UC(0x2212) -void eeconfig_init_user(void) { - set_unicode_input_mode(UC_WINC); -} - enum layers { L_BASE, L_FN, @@ -162,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│Scr│Pau│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │Stp│Ply│Prv│Nxt│Clear│Ins│ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ @@ -173,7 +169,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [L_FN] = LAYOUT_truefox( \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, \ - KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \ _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \ _______, DESKTOP, DSKTP_L, KC_WH_D, DSKTP_R, _______, KC_HOME, KC_PGDN, KC_END \ -- cgit v1.2.3-24-g4f1b