Mercurial > crkbdyaz
changeset 1:366930ab82c7 draft
- enable features: EXTRAKEY_ENABLE,NKRO_ENABLE
- disable feature: RGBLIGHT_ENABLE
- kinesis friendly keymap
- extend TAPPING_TERM to 200
- add macros: RTAB,LTAB,RSPC,LSPC,SSCR,SWIN,NAPP,NWIN
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 12 Feb 2019 10:36:38 +0900 |
parents | 24e3fb306436 |
children | ef0cbe565d18 |
files | config.h keymap.c rules.mk |
diffstat | 3 files changed, 100 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/config.h Thu Feb 07 11:31:54 2019 +0900 +++ b/config.h Tue Feb 12 10:36:38 2019 +0900 @@ -33,7 +33,7 @@ #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 +#define TAPPING_TERM 200 #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS
--- a/keymap.c Thu Feb 07 11:31:54 2019 +0900 +++ b/keymap.c Tue Feb 12 10:36:38 2019 +0900 @@ -32,7 +32,15 @@ RAISE, ADJUST, BACKLIT, - RGBRST + RGBRST, + RTAB, + LTAB, + RSPC, + LSPC, + SSCR, + SWIN, + NAPP, + NWIN }; enum macro_keycodes { @@ -57,52 +65,64 @@ #define KC_GUIEI GUI_T(KC_LANG2) #define KC_ALTKN ALT_T(KC_LANG1) +#define KC_RTAB RTAB +#define KC_LTAB LTAB +#define KC_RSPC RSPC +#define KC_LSPC LSPC +#define KC_SSCR SSCR +#define KC_SWIN SWIN +#define KC_NAPP NAPP +#define KC_NWIN NWIN + +#define SS_RGUI(string) SS_DOWN(X_RGUI) string SS_UP(X_RGUI) + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ + ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + LOWER, SPC, LGUI, ENT, BSPC, RAISE \ //`--------------------' `--------------------' ), [_LOWER] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ + EQL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSLS,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - CTLTB, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, XXXXX,\ + CTLTB, F1, F2, F3, F4, F5, PGUP, LEFT, DOWN, UP, RIGHT, XXXXX, \ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, XXXXX,\ + LSFT, F6, F7, F8, F9, F10, PGDN, HOME, END, F11, F12, RSFT, \ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + LOWER, SPC, LGUI, ENT, BSPC, RAISE \ //`--------------------' `--------------------' ), [_RAISE] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - ESC, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + PLUS, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, PIPE,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ + CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, LCBR, RCBR, XXXXX, \ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ + LSFT, GRV, TILD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, LBRC, RBRC, RSFT,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + LOWER, SPC, LGUI, ENT, BSPC, RAISE \ //`--------------------' `--------------------' ), [_ADJUST] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + RST, XXXXX, XXXXX, SSCR, SWIN, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RST,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + XXXXX, LTAB, RTAB, LSPC, RSPC, NAPP, XXXXX, MUTE, VOLD, VOLU, XXXXX, XXXXX,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, NWIN, XXXXX, MRWD, MPLY, MFFD, XXXXX, XXXXX,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + LOWER, SPC, LGUI, ENT, BSPC, RAISE \ //`--------------------' `--------------------' ) }; @@ -243,6 +263,66 @@ } #endif break; + case RTAB: + //ctrl-tab + if(record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_TAP(X_TAB))); + } + break; + case LTAB: + //ctrl-shift-tab + if(record->event.pressed) { + SEND_STRING(SS_LSFT(SS_LCTRL(SS_TAP(X_TAB)))); + } + break; + case RSPC: + //ctrl-right + if(record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_TAP(X_RIGHT))); + } + break; + case LSPC: + //ctrl-left + if(record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_TAP(X_LEFT))); + } + break; + case SSCR: + //shift-cmd-3 + if(record->event.pressed) { + SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_3)))); + } + break; + case SWIN: + //shift-cmd-4 + if(record->event.pressed) { + SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_4)))); + } + break; + case NAPP: + //cmd-tab + if(record->event.pressed) { + SEND_STRING(SS_RGUI(SS_TAP(X_TAB))); + } + break; + case NWIN: + //cmd-grave + if(record->event.pressed) { + SEND_STRING(SS_RGUI(SS_TAP(X_GRAVE))); + } + break; + +#if 0 + case _ENTER: + if (record->event.pressed && get_mods() & MOD_BIT(KC_HYPR)) { + SEND_STRING ("string"); + } else { + SEND_STRING (SS_TAP(X_ENTER)); + } + return false; + break; +#endif + } return true; }
--- a/rules.mk Thu Feb 07 11:31:54 2019 +0900 +++ b/rules.mk Tue Feb 12 10:36:38 2019 +0900 @@ -5,17 +5,18 @@ # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +#CONVERT_TO_PROTON_C = yes # use ARM SoC # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend