diff options
Diffstat (limited to 'keyboards/helix/rev2/keymaps')
26 files changed, 1134 insertions, 182 deletions
diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index 6da6849a1d..ed37675794 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -23,4 +23,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // place overrides here +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + #endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index dca9be9a47..0fb821affb 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ ) }; @@ -296,7 +296,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ ) }; @@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { TOG_STATUS = !TOG_STATUS; #ifdef RGBLIGHT_ENABLE - //rgblight_mode(16); + //rgblight_mode(RGBLIGHT_MODE_SNAKE + 1); #endif } layer_on(_LOWER); @@ -396,7 +396,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { TOG_STATUS = !TOG_STATUS; #ifdef RGBLIGHT_ENABLE - //rgblight_mode(15); + //rgblight_mode(RGBLIGHT_MODE_SNAKE); #endif } layer_on(_RAISE); @@ -512,7 +512,7 @@ void music_scale_user(void) // hook point for 'led_test' keymap // 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); +// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); __attribute__ ((weak)) void led_test_init(void) {} diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 5340a74ba2..3f84b895aa 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -14,7 +14,7 @@ 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG @@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/config.h b/keyboards/helix/rev2/keymaps/edvorakjp/config.h index a7a5f83600..769988cdb5 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/config.h +++ b/keyboards/helix/rev2/keymaps/edvorakjp/config.h @@ -4,5 +4,21 @@ #undef TAPPING_FORCE_HOLD #undef TAPPING_TERM #define TAPPING_TERM 120 +#define SWAP_SCLN + +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif #endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c index 650a39115a..fd324a859a 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c @@ -11,7 +11,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case KC_LOCK: if (record->event.pressed) { - if (edvorakjp_config.enable_kc_lang) { + if (get_enable_kc_lang()) { SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); } else { SEND_STRING( SS_LGUI("l") ); @@ -35,7 +35,7 @@ void matrix_scan_user(void) { #ifdef RGBLIGHT_ENABLE uint32_t layer_state_set_keymap(uint32_t state) { - rgblight_mode_noeeprom(1); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch (biton32(state)) { case _EDVORAKJ1: case _EDVORAKJ2: @@ -52,7 +52,7 @@ uint32_t layer_state_set_keymap(uint32_t state) { rgblight_sethsv_noeeprom_green(); break; default: // for any other layers, or the default layer - rgblight_mode_noeeprom(28); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); rgblight_sethsv_noeeprom_red(); break; } diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c index d8257d81f8..805e6b17b7 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c @@ -5,7 +5,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EDVORAK] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LBRC,RBRC,COMM,DOT , P , Y , F , G , R , W , Q ,BSLS, + LBRC,RBRC,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, //|----+----+----+----+----+----| |----+----+----+----+----+----| EQL , A , O , E , I , U , D , T , N , S , M ,MINS, //|----+----+----+----+----+----| |----+----+----+----+----+----| diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c index 9116b39665..ef1b9d358c 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c @@ -7,7 +7,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,----+----+----+----+----+----. ,----+----+----+----+----+----. GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC,RBRC,COMM,DOT , P , Y , F , G , R , W , Q ,BSLS, + LBRC,RBRC,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, //|----+----+----+----+----+----| |----+----+----+----+----+----| EQL , A , O , E , I , U , D , T , N , S , M ,MINS, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c index 5ced1d4fad..227e2c56f8 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c @@ -23,15 +23,10 @@ void render_status(struct CharacterMatrix *matrix) { // Render to mode icon static char logo[][2][3] = {{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if (edvorakjp_config.enable_kc_lang) { - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - } else { - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); - } + int mode_number = get_enable_kc_lang() ? 0 : 1; + matrix_write(matrix, logo[mode_number][0]); + matrix_write(matrix, "\n"); + matrix_write(matrix, logo[mode_number][1]); // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below char buf[40]; @@ -63,7 +58,7 @@ void render_status(struct CharacterMatrix *matrix) { // Host Keyboard LED Status char led[40]; snprintf(led, sizeof(led), "\n%s %s %s %s", - edvorakjp_config.enable_jp_extra_layer && japanese_mode ? "EXT" : " ", + get_enable_jp_extra_layer() && get_japanese_mode() ? "EXT" : " ", (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NMLK" : " ", (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index 67da9c370b..4257d004da 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk @@ -13,7 +13,7 @@ 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG @@ -102,7 +102,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) diff --git a/keyboards/helix/rev2/keymaps/five_rows/README.md b/keyboards/helix/rev2/keymaps/five_rows/README.md index 4feaac2efb..10a4fa942c 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/README.md +++ b/keyboards/helix/rev2/keymaps/five_rows/README.md @@ -46,7 +46,7 @@ Mac mode swap Alt/Win(GUI) key. | ---- | ---- | --- | |on/off|Adjust + e(Qwerty)|RGB_TOG| | |Adjust + i(Qwerty)| | -|change mode|Adjust + d(Qwerty) |RGB_SMOD| +|change mode|Adjust + d(Qwerty) |RGB_MOD| | |Adjust + k(Qwerty)| | |HUE +|Adjust + Left Control|RGB_HUI| | |Adjust + Right Control| | diff --git a/keyboards/helix/rev2/keymaps/five_rows/README_jp.md b/keyboards/helix/rev2/keymaps/five_rows/README_jp.md index 932e200a56..317ffdd71d 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/README_jp.md +++ b/keyboards/helix/rev2/keymaps/five_rows/README_jp.md @@ -68,7 +68,7 @@ Winモードでは、該当のキーはどちらも共に Alt + `(日本語IME | ---- | ---- | --- | |オン/オフ|Adjust + e(Qwerty)|RGB_TOG| | |Adjust + i(Qwerty)| | -|モード切り替え|Adjust + d(Qwerty) |RGB_SMOD| +|モード切り替え|Adjust + d(Qwerty) |RGB_MOD| | |Adjust + k(Qwerty)| | |色相 +|Adjust + Left Control|RGB_HUI| | |Adjust + Right Control| | diff --git a/keyboards/helix/rev2/keymaps/five_rows/config.h b/keyboards/helix/rev2/keymaps/five_rows/config.h index 6da6849a1d..538859bc3c 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/config.h +++ b/keyboards/helix/rev2/keymaps/five_rows/config.h @@ -21,6 +21,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef CONFIG_USER_H #define CONFIG_USER_H +#undef TAPPING_TERM +#define TAPPING_TERM 300 +#define PERMISSIVE_HOLD +/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD. + see tmk_core/common/action_tapping.c */ + // place overrides here +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + //#define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + #endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c index 548caf8220..7b7d573d6a 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c @@ -10,6 +10,9 @@ #ifdef SSD1306OLED #include "ssd1306.h" #endif +#ifdef CONSOLE_ENABLE + #include <print.h> +#endif extern keymap_config_t keymap_config; @@ -28,6 +31,7 @@ enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, + _EUCALYN, _KEYPAD, _AUX, _KAUX, @@ -41,23 +45,27 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, + EUCALYN, KEYPAD, - EISU, - KANA, - ZERO2, + KC_xEISU, + KC_xKANA, + KC_ZERO2, RGBRST }; -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros -#define M_SAMPLE M(KC_SAMPLEMACRO) +#define KC_LOWER MO(_LOWER) +#define KC_RABS LT(_RAISE,KC_BSPC) +#define KC_RAEN LT(_RAISE,KC_ENT) +#define KC_FF12 LT(_PADFUNC,KC_F12) +#define KC_____ _______ +#define KC_XXXX XXXXXXX +#define KC_ADJ MO(_ADJUST) +#define KC_LSMI LSFT(KC_MINS) +#define KC_LSEQ LSFT(KC_EQL) +#define KC_LSRB LSFT(KC_RBRC) +#define KC_LSLB LSFT(KC_LBRC) +#define ___ _______ #if HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -72,16 +80,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | GUI | Alt | Space| BS | Enter| Space| Alt | GUI | Menu |Lower |Lower | + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | * `-------------------------------------------------------------------------------------------------' */ - [_QWERTY] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - MO(_LOWER),MO(_LOWER), KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, LT(_RAISE,KC_BSPC), \ - LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP,MO(_LOWER),MO(_LOWER) \ + [_QWERTY] = LAYOUT_kc( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, BSLS, \ + LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCTL, \ + LSFT, Z, X, C, V, B, GRV, QUOT, N, M, COMM, DOT, SLSH, RSFT, \ + LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ ), /* Colemak @@ -94,16 +101,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | GUI | Alt | Space| BS | Enter| Space| Alt | GUI | Menu |Lower |Lower | + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | * `-------------------------------------------------------------------------------------------------' */ - [_COLEMAK] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ - KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_RCTL, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_QUOT, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - MO(_LOWER),MO(_LOWER), KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, LT(_RAISE,KC_BSPC), \ - LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP,MO(_LOWER),MO(_LOWER) \ + [_COLEMAK] = LAYOUT_kc( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ + TAB, Q, W, F, P, G, J, L, U, Y, SCLN, BSLS, \ + LCTL, A, R, S, T, D, H, N, E, I, O, RCTL, \ + LSFT, Z, X, C, V, B, GRV, QUOT, K, M, COMM, DOT, SLSH, RSFT, \ + LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ ), /* Dvorak @@ -116,16 +122,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | GUI | Alt | Space| BS | Enter| Space| Alt | GUI | Menu |Lower |Lower | + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | * `-------------------------------------------------------------------------------------------------' */ - [_DVORAK] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, \ - KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_RCTL, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_GRV, KC_SLSH, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - MO(_LOWER),MO(_LOWER), KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, LT(_RAISE,KC_BSPC), \ - LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP,MO(_LOWER),MO(_LOWER) \ + [_DVORAK] = LAYOUT_kc( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ + TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, BSLS, \ + LCTL, A, O, E, U, I, D, H, T, N, S, RCTL, \ + LSFT, SCLN, Q, J, K, X, GRV, SLSH, B, M, W, V, Z, RSFT, \ + LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ + ), + + /* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_EUCALYN] = LAYOUT_kc( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ + TAB, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, BSLS, \ + LCTL, A, O, E, I, U, G, T, K, S, N, RCTL, \ + LSFT, Z, X, C, V, F, GRV, QUOT, B, H, J, L, SLSH, RSFT, \ + LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ ), /* Keypad @@ -141,13 +167,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 0 | , | . | Enter| F5 | F10 | F12 | F12 | F5 | F10 | Enter| 0 | , | . | * `-------------------------------------------------------------------------------------------------' */ - [_KEYPAD] = LAYOUT( \ - KC_TAB, KC_PSLS, KC_PAST, KC_DEL, KC_F1, KC_F6, KC_F1, KC_F6, KC_DEL, KC_TAB, KC_PSLS, KC_PAST, \ - KC_KP_7, KC_KP_8, KC_KP_9, KC_BSPC, KC_F2, KC_F7, KC_F2, KC_F7, KC_BSPC, KC_KP_7, KC_KP_8, KC_KP_9, \ - KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, KC_F3, KC_F8, KC_F3, KC_F8, KC_PMNS, KC_KP_4, KC_KP_5, KC_KP_6, \ - KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, KC_F4, KC_F9, KC_F11, KC_F11, KC_F4, KC_F9, KC_PPLS, KC_KP_1, KC_KP_2, KC_KP_3, \ - KC_KP_0, KC_COMM, KC_PDOT, KC_PENT, KC_F5, KC_F10, LT(_PADFUNC,KC_F12), - LT(_PADFUNC,KC_F12),KC_F5, KC_F10, KC_PENT, KC_KP_0, KC_COMM, KC_PDOT \ + [_KEYPAD] = LAYOUT_kc( \ + TAB, PSLS, PAST, DEL, F1, F6, F1, F6, DEL, TAB, PSLS, PAST, \ + KP_7, KP_8, KP_9, BSPC, F2, F7, F2, F7, BSPC, KP_7, KP_8, KP_9, \ + KP_4, KP_5, KP_6, PMNS, F3, F8, F3, F8, PMNS, KP_4, KP_5, KP_6, \ + KP_1, KP_2, KP_3, PPLS, F4, F9, F11, F11, F4, F9, PPLS, KP_1, KP_2, KP_3, \ + KP_0, COMM, PDOT, PENT, F5, F10, FF12, FF12, F5, F10, PENT, KP_0, COMM, PDOT \ ), /* AUX modifier key layer @@ -163,12 +188,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | 00 | | | | | | | | | | | 00 | | * `-------------------------------------------------------------------------------------------------' */ - [_KAUX] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, ZERO2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ZERO2, _______ \ + [_KAUX] = LAYOUT_kc( \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ZERO2,____ \ ), /* Keypad function layer @@ -184,13 +209,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_PADFUNC] = LAYOUT( \ - XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, KC_SLCK, KC_PSCR, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_PGUP, KC_PGUP, KC_UP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, KC_DEL, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, KC_END, XXXXXXX, KC_PGDN,MO(_ADJUST), - MO(_ADJUST), KC_PGDN, XXXXXXX, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + [_PADFUNC] = LAYOUT_kc( \ + XXXX, XXXX, XXXX, PAUS, SLCK, PSCR, PSCR, SLCK, PAUS, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, HOME, UP, PGUP, PGUP, UP, HOME, XXXX, XXXX, XXXX, \ + XXXX, DEL, INS, LEFT, DOWN, RGHT, LEFT, DOWN, RGHT, INS, DEL, XXXX, \ + XXXX, XXXX, XXXX, END, XXXX, PGDN, ADJ, ADJ, PGDN, XXXX, END, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \ ), /* Lower @@ -206,13 +230,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | PrtSc| | | | | | | | | PrtSc| | | * `-------------------------------------------------------------------------------------------------' */ - [_LOWER] = LAYOUT( \ - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ - XXXXXXX, XXXXXXX, KC_PAUS, KC_SLCK, KC_INS, XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PAUS, XXXXXXX, KC_F12, \ - _______, KC_HOME, XXXXXXX, KC_UP, KC_DEL, KC_PGUP, KC_PGUP, KC_DEL, KC_UP, XXXXXXX, KC_HOME, _______, \ - _______, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX,KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, \ - _______, _______, KC_PSCR, _______, _______, _______, MO(_ADJUST), - MO(_ADJUST), _______, _______, _______, KC_PSCR, _______, _______ \ + [_LOWER] = LAYOUT_kc( \ + XXXX, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \ + XXXX, XXXX, PAUS, SLCK, INS, XXXX, XXXX, INS, SLCK, PAUS, XXXX, F12, \ + ____, HOME, XXXX, UP, DEL, PGUP, PGUP, DEL, UP, XXXX, HOME, ____, \ + ____, END, LEFT, DOWN, RGHT, PGDN, XXXX, XXXX, PGDN, LEFT, DOWN, RGHT, END, ____, \ + ____, ____, PSCR, ____, ____, ____, ADJ, ADJ, ____, ____, ____, PSCR, ____, ____ \ ), /* Raise @@ -228,18 +251,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_RAISE] = LAYOUT( \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LSFT(KC_MINS), KC_MINS, KC_EQL, LSFT(KC_EQL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), KC_LBRC, KC_RBRC, LSFT(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EISU, EISU, KANA, KANA, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, \ - MO(_ADJUST),MO(_ADJUST),XXXXXXX, _______, _______, XXXXXXX, _______, - _______, XXXXXXX, _______, _______, XXXXXXX,MO(_ADJUST),MO(_ADJUST) \ + [_RAISE] = LAYOUT_kc( \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, LSMI, MINS, EQL, LSEQ, XXXX, XXXX, XXXX, XXXX, \ + ____, XXXX, XXXX, XXXX, LSLB, LBRC, RBRC, LSRB, XXXX, XXXX, XXXX, ____, \ + ____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA,MNXT, VOLD, VOLU, MPLY, ____, \ + ADJ, ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, ADJ, ADJ \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------. ,-----------------------------------------. - * | | |Keypad|Dvorak|Colemk|Qwerty| |Qwerty|Colemk|Dvorak|Keypad| | | + * | |Keypad|Dvorak|Colemk|Euclyn|Qwerty| |Qwerty|Euclyn|Colemk|Dvorak|Keypad| | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | Reset|RGBRST|RGB ON|Aud on| Win | | Win |Aud on|RGB ON|RGBRST| | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -251,11 +273,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT( \ - XXXXXXX, XXXXXXX, KEYPAD, DVORAK, COLEMAK, QWERTY, QWERTY, COLEMAK, DVORAK, KEYPAD, XXXXXXX, XXXXXXX, \ - XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \ - RGB_HUI, RGB_SAI, RGB_VAI,RGB_SMOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF,RGB_SMOD, RGB_VAI, RGB_SAI, RGB_HUI, \ - RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ - _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ + XXXXXXX, KEYPAD, DVORAK, COLEMAK, EUCALYN, QWERTY, QWERTY, EUCALYN, COLEMAK, DVORAK, KEYPAD, XXXXXXX, \ + XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \ + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, \ + RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ ), /* AUX modifier key layer @@ -271,13 +293,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | BS | Enter| | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_AUX] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, KC_BSPC, LT(_RAISE,KC_ENT), \ - _______, _______, _______, _______, _______, _______, _______ \ + [_AUX] = LAYOUT_kc( \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, BSPC, RAEN, ____, ____, ____, ____, ____, ____, ____ \ ) }; @@ -304,23 +325,25 @@ uint32_t default_layer_state_set_kb(uint32_t state) { current_default_layer = state - 1; // 1<<_DVORAK - 2 == 4 - 2 == _DVORAK (=2) if ( current_default_layer == 3 ) current_default_layer -= 1; - // 1<<_KEYPAD - 5 == 8 - 5 == _KEYPAD (=3) + // 1<<_EUCALYN - 5 == 8 - 5 == _EUCALYN (=3) if ( current_default_layer == 7 ) current_default_layer -= 4; + // 1<<_KEYPAD - 12 == 16 - 12 == _KEYPAD (=4) + if ( current_default_layer == 15 ) current_default_layer -= 11; return state; } void update_base_layer(int base) { if( current_default_layer != base ) { - eeconfig_update_default_layer(1UL<<base); - default_layer_set(1UL<<base); - layer_off(_AUX); - layer_off(_KAUX); + eeconfig_update_default_layer(1UL<<base); + default_layer_set(1UL<<base); + layer_off(_AUX); + layer_off(_KAUX); } else { - if( base < _KEYPAD ) - layer_invert(_AUX); - else - layer_invert(_KAUX); + if( base < _KEYPAD ) + layer_invert(_AUX); + else + layer_invert(_KAUX); } } @@ -331,7 +354,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_qwerty); #endif - update_base_layer(_QWERTY); + update_base_layer(_QWERTY); } return false; break; @@ -340,7 +363,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_colemak); #endif - update_base_layer(_COLEMAK); + update_base_layer(_COLEMAK); } return false; break; @@ -349,7 +372,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_dvorak); #endif - update_base_layer(_DVORAK); + update_base_layer(_DVORAK); + } + return false; + break; + case EUCALYN: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + update_base_layer(_EUCALYN); } return false; break; @@ -358,17 +390,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_dvorak); #endif - update_base_layer(_KEYPAD); + update_base_layer(_KEYPAD); } return false; break; - case ZERO2: + case KC_ZERO2: if (record->event.pressed) { SEND_STRING("00"); } return false; break; - case EISU: + case KC_xEISU: if (record->event.pressed) { if(keymap_config.swap_lalt_lgui==false){ register_code(KC_LANG2); @@ -380,7 +412,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KANA: + case KC_xKANA: if (record->event.pressed) { if(keymap_config.swap_lalt_lgui==false){ register_code(KC_LANG1); @@ -468,10 +500,10 @@ static void render_logo(struct CharacterMatrix *matrix) { char buf[30]; if(rgblight_config.enable) { snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", - rgblight_config.mode, - rgblight_config.hue/RGBLIGHT_HUE_STEP, - rgblight_config.sat/RGBLIGHT_SAT_STEP, - rgblight_config.val/RGBLIGHT_VAL_STEP); + rgblight_config.mode, + rgblight_config.hue/RGBLIGHT_HUE_STEP, + rgblight_config.sat/RGBLIGHT_SAT_STEP, + rgblight_config.val/RGBLIGHT_VAL_STEP); matrix_write(matrix, buf); } #endif @@ -481,6 +513,7 @@ static void render_logo(struct CharacterMatrix *matrix) { static const char Qwerty_name[] PROGMEM = " Qwerty"; static const char Colemak_name[] PROGMEM = " Colemak"; static const char Dvorak_name[] PROGMEM = " Dvorak"; +static const char Eucalyn_name[] PROGMEM = " Eucalyn"; static const char Keypad_name[] PROGMEM = " Keypad"; static const char AUX_name[] PROGMEM = ":AUX"; @@ -494,6 +527,7 @@ static const char *layer_names[] = { [_QWERTY] = Qwerty_name, [_COLEMAK] = Colemak_name, [_DVORAK] = Dvorak_name, + [_EUCALYN]= Eucalyn_name, [_KEYPAD] = Keypad_name, [_AUX] = AUX_name, [_KAUX] = KAUX_name, @@ -526,18 +560,18 @@ void render_status(struct CharacterMatrix *matrix) { lstate && name_num < sizeof(layer_names)/sizeof(char *); lstate >>=1, name_num++ ) { if( (lstate & 1) != 0 ) { - if( layer_names[name_num] ) { - matrix_write_P(matrix, layer_names[name_num]); - } + if( layer_names[name_num] ) { + matrix_write_P(matrix, layer_names[name_num]); + } } } // Host Keyboard LED Status char led[40]; snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", - (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", - (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); + (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", + (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", + (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); matrix_write(matrix, led); } diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index 402f855ae1..bd7130cfc6 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -6,15 +6,19 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration +# CONSOLE_ENABLE and COMMAND_ENABLE +# yes, no +1500 +# yes, yes +3200 +# no, yes +400 NKRO_ENABLE = no # 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG @@ -66,6 +70,9 @@ ifneq ($(strip $(HELIX)),) ifeq ($(findstring ios,$(HELIX)), ios) IOS_DEVICE_ENABLE = yes endif + ifeq ($(findstring console,$(HELIX)), console) + CONSOLE_ENABLE = yes + endif $(eval $(call HELIX_CUSTOMISE_MSG)) $(info ) endif @@ -100,7 +107,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/config.h b/keyboards/helix/rev2/keymaps/five_rows_jis/config.h index 34650b99a6..97494c937f 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/config.h +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/config.h @@ -40,4 +40,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MOUSEKEY_DELAY 0 #endif +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + #endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c index 141b222753..8c2040d5be 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c @@ -204,7 +204,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, DL_BAS, DL_BASE, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, DL_BAS, DL_BASE, AG_NORM, AG_SWAP, XXXXXXX, \ XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, \ - XXXXXXX, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, \ + XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; @@ -214,7 +214,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif #ifdef SSD1306OLED -char keylog[20] = {}; +char keylog[24] = {}; const char code_to_name[60] = { ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', @@ -223,7 +223,7 @@ const char code_to_name[60] = { 'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ', ' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '}; -inline void set_keylog(uint16_t keycode, keyrecord_t *record) +static inline void set_keylog(uint16_t keycode, keyrecord_t *record) { char name = ' '; uint8_t leds = host_keyboard_leds(); @@ -246,6 +246,12 @@ inline void set_keylog(uint16_t keycode, keyrecord_t *record) } #endif +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT(mode) rgblight_mode(mode) +#else +#define RGBLIGHT(mode) +#endif + // define variables for reactive RGB int RGB_current_mode; #ifdef ADJUST_MACRO_ENABLE @@ -263,12 +269,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { #define ADJUST_MACRO(layer1, layer2, layer3) #endif -#ifdef RGBLIGHT_ENABLE -#define RGBLIGHT(mode) rgblight_mode(mode) -#else -#define RGBLIGHT(mode) -#endif - bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef SSD1306OLED if (record->event.pressed) { @@ -344,7 +344,7 @@ void matrix_scan_user(void) { iota_gfx_task(); // this is what updates the display continuously } -inline void matrix_update(struct CharacterMatrix *dest, +static inline void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { if (memcmp(dest->display, source->display, sizeof(dest->display))) { memcpy(dest->display, source->display, sizeof(dest->display)); @@ -367,13 +367,15 @@ const char helix_logo[]={ 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, 0}; -inline void render_logo(struct CharacterMatrix *matrix) { + +static inline void render_logo(struct CharacterMatrix *matrix) { matrix_write(matrix, helix_logo); } const char mac_win_logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; -inline void render_status(struct CharacterMatrix *matrix) { + +static inline void render_status(struct CharacterMatrix *matrix) { char buf[20]; // Render to mode icon diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 5340a74ba2..3f84b895aa 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -14,7 +14,7 @@ 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG @@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) diff --git a/keyboards/helix/rev2/keymaps/froggy/config.h b/keyboards/helix/rev2/keymaps/froggy/config.h index df72aef123..517368ae94 100644 --- a/keyboards/helix/rev2/keymaps/froggy/config.h +++ b/keyboards/helix/rev2/keymaps/froggy/config.h @@ -26,4 +26,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */ #define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + #endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c index 5ac927af3e..efd8a29160 100644 --- a/keyboards/helix/rev2/keymaps/froggy/keymap.c +++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Y | S | N | I | U |Space | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | win | Sym | Num | OPT | Ent | | | | | | | | + * | Ctrl | Alt | Gui | Sym | Num | OPT | Ent | | | | | | | | * `-------------------------------------------------------------------------------------------------' */ [_BASE] = LAYOUT( \ @@ -256,8 +256,31 @@ void register_delay_code(uint8_t layer){ } } +#ifdef RGBLIGHT_ENABLE +struct keybuf { + char col, row; + char frame; +}; +struct keybuf keybufs[256]; +unsigned char keybuf_begin, keybuf_end; + +int col, row; +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef RGBLIGHT_ENABLE + col = record->event.key.col; + row = record->event.key.row; + if (record->event.pressed && ((row < 5 && is_master) || (row >= 5 && !is_master))) { + int end = keybuf_end; + keybufs[end].col = col; + keybufs[end].row = row % 5; + keybufs[end].frame = 0; + keybuf_end ++; + } + #endif + if(tap_timer&&keycode!=OPT_TAP_SP){ tapping_key = true; } @@ -376,7 +399,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef RGBLIGHT_ENABLE if (record->event.pressed) { RGBAnimation = true; - rgblight_mode(6); + rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); RGB_current_mode = rgblight_config.mode; } #endif @@ -385,7 +408,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef RGBLIGHT_ENABLE if (record->event.pressed) { RGBAnimation = true; - rgblight_mode(10); + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1); RGB_current_mode = rgblight_config.mode; } #endif @@ -394,7 +417,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef RGBLIGHT_ENABLE if (record->event.pressed) { RGBAnimation = true; - rgblight_mode(21); + rgblight_mode(RGBLIGHT_MODE_KNIGHT); RGB_current_mode = rgblight_config.mode; } #endif @@ -475,6 +498,61 @@ void music_scale_user(void) #define L_NFNLAYER 192 #define L_MOUSECURSOR 256 +// LED Effect +#ifdef RGBLIGHT_ENABLE +unsigned char rgb[7][5][3]; +void led_ripple_effect(char r, char g, char b) { + static int scan_count = -10; + static int keys[] = { 6, 6, 6, 7, 7 }; + static int keys_sum[] = { 0, 6, 12, 18, 25 }; + + if (scan_count == -1) { + rgblight_enable_noeeprom(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + } else if (scan_count >= 0 && scan_count < 5) { + for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) { + int i = c; + // FIXME: + + int y = scan_count; + int dist_y = abs(y - keybufs[i].row); + for (int x=0; x<keys[y]; x++) { + int dist = abs(x - keybufs[i].col) + dist_y; + if (dist <= keybufs[i].frame) { + int elevation = MAX(0, (8 + dist - keybufs[i].frame)) << 2; + if (elevation) { + if ((rgb[x][y][0] != 255) && r) { rgb[x][y][0] = MIN(255, elevation + rgb[x][y][0]); } + if ((rgb[x][y][1] != 255) && g) { rgb[x][y][1] = MIN(255, elevation + rgb[x][y][1]); } + if ((rgb[x][y][2] != 255) && b) { rgb[x][y][2] = MIN(255, elevation + rgb[x][y][2]); } + } + } + } + } + } else if (scan_count == 5) { + for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) { + int i = c; + if (keybufs[i].frame < 18) { + keybufs[i].frame ++; + } else { + keybuf_begin ++; + } + } + } else if (scan_count >= 6 && scan_count <= 10) { + int y = scan_count - 6; + for (int x=0; x<keys[y]; x++) { + int at = keys_sum[y] + ((y & 1) ? x : (keys[y] - x - 1)); + led[at].r = rgb[x][y][0]; + led[at].g = rgb[x][y][1]; + led[at].b = rgb[x][y][2]; + } + rgblight_set(); + } else if (scan_count == 11) { + memset(rgb, 0, sizeof(rgb)); + } + scan_count++; + if (scan_count >= 12) { scan_count = 0; } +} +#endif uint8_t layer_state_old; @@ -494,42 +572,64 @@ void matrix_scan_user(void) { if(layer_state_old != layer_state){ switch (layer_state) { case L_BASE: - #ifdef RGBLIGHT_ENABLE - if (!RGBAnimation){ - rgblight_sethsv(187,255,255); - rgblight_mode(1); - }else{ - rgblight_mode(RGB_current_mode); - } - #endif break; case L_OPT: register_delay_code(_OPT); break; case L_NUM: register_delay_code(_NUM); - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv(25,255,255); - rgblight_mode(1); - #endif break; case L_SYM: register_delay_code(_SYM); - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv(96,255,255); - rgblight_mode(1); - #endif break; case L_FUNC: register_delay_code(_FUNC); - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv(331,255,255); - rgblight_mode(1); - #endif break; } layer_state_old = layer_state; } + + #ifdef RGBLIGHT_ENABLE + if(!RGBAnimation){ + switch (layer_state) { + case L_BASE: + #ifdef RGBLED_BACK + led_ripple_effect(0,112,127); + #else + rgblight_setrgb(0,112,127); + #endif + break; + case L_OPT: + #ifdef RGBLED_BACK + led_ripple_effect(127,0,100); + #else + rgblight_setrgb(127,0,100); + #endif + break; + case L_NUM: + #ifdef RGBLED_BACK + led_ripple_effect(127,23,0); + #else + rgblight_setrgb(127,23,0); + #endif + break; + case L_SYM: + #ifdef RGBLED_BACK + led_ripple_effect(0,127,0); + #else + rgblight_setrgb(0,127,0); + #endif + break; + case L_FUNC: + #ifdef RGBLED_BACK + led_ripple_effect(127,0,61); + #else + rgblight_setrgb(127,0,61); + #endif + break; + } + } + #endif } //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index aa97964134..f460170711 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -14,7 +14,7 @@ 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG @@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) diff --git a/keyboards/helix/rev2/keymaps/led_test/config.h b/keyboards/helix/rev2/keymaps/led_test/config.h index 6da6849a1d..e2bdf2f329 100644 --- a/keyboards/helix/rev2/keymaps/led_test/config.h +++ b/keyboards/helix/rev2/keymaps/led_test/config.h @@ -23,4 +23,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // place overrides here +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + //#define RGBLIGHT_EFFECT_RAINBOW_MOOD + //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + //#define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + //#define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST // led_test keymap need only this. + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + #endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/led_test/led_test_init.c b/keyboards/helix/rev2/keymaps/led_test/led_test_init.c index 1d9cb4ebde..85f5d1aa7e 100644 --- a/keyboards/helix/rev2/keymaps/led_test/led_test_init.c +++ b/keyboards/helix/rev2/keymaps/led_test/led_test_init.c @@ -5,7 +5,7 @@ void led_test_init(void) { static int scan_count = 0; if( scan_count == 2 ) { rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(35); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); } if( scan_count < 3 ) scan_count ++; } @@ -15,6 +15,6 @@ void led_test_init(void) { // can use this? void startup_user(void) { rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(35); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); } #endif diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index c7ee75c36b..a9cd251bc5 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -14,7 +14,7 @@ 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing define HELIX_CUSTOMISE_MSG @@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) endif ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(OLED_ENABLE)), yes) diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/config.h b/keyboards/helix/rev2/keymaps/yshrsmz/config.h new file mode 100644 index 0000000000..d70f23c3e3 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/yshrsmz/config.h @@ -0,0 +1,38 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#pragma once + +/* auto shift config */ +#define AUTO_SHIFT_TIMEOUT 150 + +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c new file mode 100644 index 0000000000..1bde66e885 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c @@ -0,0 +1,558 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _FUNC, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + FUNC, + ADJUST, + EISU, + KANA +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +#if HELIX_ROWS == 5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | Fn | Fn | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | EISU | Ctrl | Alt | GUI |Lower |Space | Bksp |Enter |Space |Raise | GUI | Alt | Ctrl | KANA | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, FUNC, FUNC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + EISU, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KANA \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Func + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | LEFT | DOWN | UP |RIGHT | PGUP | | + * |------+------+------+------+------+------|------+------|------+------+------+------+------+------| + * | | | | | | | | | HOME | END |Alt+← |Alt+→ | PGDN | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_FUNC] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset| | | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| Mac | | Win |Qwerty| | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +#elif HELIX_ROWS == 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | = | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | EISU | Ctrl | Alt | GUI |ESC/Lower | Func | Bksp |Enter |Space |Raise | GUI | Alt | Ctrl | KANA | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + EISU, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_ESC), FUNC, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KANA \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Func + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | LEFT | DOWN | UP |RIGHT | PGUP | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | HOME | END |Alt+← |Alt+→ | PGDN | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_FUNC] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| Mac | | Win |Qwerty| | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +#else +#error "undefined keymaps" +#endif + + +#ifdef AUDIO_ENABLE + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGBLIGHT_MODE_SNAKE + 1); + #endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGBLIGHT_MODE_SNAKE); + #endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + } else { + layer_off(_FUNC); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case EISU: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick +} + +void shutdown_user() +{ + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif + + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// hook point for 'led_test' keymap +// 'default' keymap's led_test_init() is empty function, do nothing +// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); +__attribute__ ((weak)) +void led_test_init(void) {} + +void matrix_scan_user(void) { + led_test_init(); + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_FUNC (1<<_FUNC) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +static void render_logo(struct CharacterMatrix *matrix) { + + static char logo[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + matrix_write(matrix, logo); + //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); +} + + + +void render_status(struct CharacterMatrix *matrix) { + + // Render to mode icon + static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + matrix_write(matrix, logo[0][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[0][1]); + }else{ + matrix_write(matrix, logo[1][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[1][1]); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(matrix, PSTR("\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(matrix, PSTR("Default")); + break; + case L_RAISE: + matrix_write_P(matrix, PSTR("Raise")); + break; + case L_LOWER: + matrix_write_P(matrix, PSTR("Lower")); + break; + case L_FUNC: + matrix_write_P(matrix, PSTR("Func")); + break; + case L_ADJUST: + case L_ADJUST_TRI: + matrix_write_P(matrix, PSTR("Adjust")); + break; + default: + matrix_write(matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", + (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", + (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); + matrix_write(matrix, led); +} + + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } +#endif + + matrix_clear(&matrix); + if(is_master){ + render_status(&matrix); + }else{ + render_logo(&matrix); + } + matrix_update(&display, &matrix); +} + +#endif diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk new file mode 100644 index 0000000000..3f390b48f8 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk @@ -0,0 +1,121 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # 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 +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 = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +define HELIX_CUSTOMISE_MSG + $(info Helix customize) + $(info - OLED_ENABLE=$(OLED_ENABLE)) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) +endef + +# Helix keyboard customize +# you can edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集します。 +HELIX_ROWS = 4 # Helix Rows is 4 or 5 +OLED_ENABLE = yes # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = no # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +### Helix keyboard 'default' keymap: convenient command line option +## make HELIX=<options> helix:defualt +## option= oled | back | under | na | ios +## ex. +## make HELIX=oled helix:defualt +## make HELIX=oled,back helix:defualt +## make HELIX=oled,under helix:defualt +## make HELIX=oled,back,na helix:defualt +## make HELIX=oled,back,ios helix:defualt +## +ifneq ($(strip $(HELIX)),) + ifeq ($(findstring oled,$(HELIX)), oled) + OLED_ENABLE = yes + endif + ifeq ($(findstring back,$(HELIX)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(HELIX)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(HELIX)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(HELIX)), ios) + IOS_DEVICE_ENABLE = yes + endif + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(info ) +endif + +# Uncomment these for checking +# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 +# $(eval $(call HELIX_CUSTOMISE_MSG)) +# $(info ) + +ifneq ($(strip $(HELIX_ROWS)), 4) + ifneq ($(strip $(HELIX_ROWS)), 5) + $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) + endif +endif +OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +AUTO_SHIFT_ENABLE = yes + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) |