diff options
| author | epaew <epaew@users.noreply.github.com> | 2018-07-08 21:11:02 +0900 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-07-08 05:11:02 -0700 |
| commit | 0b9b2a6376df286d3a5bc44a99274dc196524fc1 (patch) | |
| tree | c8b6077d6e8a5573583ec200986c45a2762e8cb9 | |
| parent | f28f5696005bdc51b9d1ff3a59c70bf47b8b897a (diff) | |
| download | qmk_firmware-0b9b2a6376df286d3a5bc44a99274dc196524fc1.tar.gz qmk_firmware-0b9b2a6376df286d3a5bc44a99274dc196524fc1.zip | |
Add edvorakjp keymap for the Helix (rev2) keyboard (#3340)
* add readme.md
* add extern declaration of edvorakjp_config to edvorakjp.h
* add oled.c
* add layout definitions
* add keymap.c
* add rules.mk
* fix rgblight issue: rgblight_setrgb() ignore RGBLIGHT_LIMIT_VAL
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/config.h | 10 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/keymap.c | 61 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c | 89 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c | 103 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h | 28 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/oled.c | 87 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/oled.h | 19 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/readme.md | 21 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/edvorakjp/rules.mk | 126 | ||||
| -rw-r--r-- | keyboards/iris/keymaps/edvorakjp/keymap.c | 2 | ||||
| -rw-r--r-- | users/edvorakjp/edvorakjp.h | 1 |
11 files changed, 545 insertions, 2 deletions
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/config.h b/keyboards/helix/rev2/keymaps/edvorakjp/config.h new file mode 100644 index 000000000..bb569ca5d --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/config.h | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | #undef TAPPING_FORCE_HOLD | ||
| 7 | #undef TAPPING_TERM | ||
| 8 | #define TAPPING_TERM 120 | ||
| 9 | |||
| 10 | #endif /* CONFIG_USER_H */ | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c new file mode 100644 index 000000000..650a39115 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "split_util.h" | ||
| 3 | #include "keymap_xrows.h" | ||
| 4 | #ifdef SSD1306OLED | ||
| 5 | #include "oled.h" | ||
| 6 | #endif | ||
| 7 | |||
| 8 | // keymaps definitions are moved to keymap_Xrows.c. | ||
| 9 | |||
| 10 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 11 | switch(keycode) { | ||
| 12 | case KC_LOCK: | ||
| 13 | if (record->event.pressed) { | ||
| 14 | if (edvorakjp_config.enable_kc_lang) { | ||
| 15 | SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); | ||
| 16 | } else { | ||
| 17 | SEND_STRING( SS_LGUI("l") ); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | return false; | ||
| 21 | } | ||
| 22 | return true; | ||
| 23 | } | ||
| 24 | |||
| 25 | #ifdef SSD1306OLED | ||
| 26 | void matrix_init_keymap(void) { | ||
| 27 | //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h | ||
| 28 | iota_gfx_init(!has_usb()); // turns on the display | ||
| 29 | } | ||
| 30 | |||
| 31 | void matrix_scan_user(void) { | ||
| 32 | iota_gfx_task(); // this is what updates the display continuously | ||
| 33 | } | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #ifdef RGBLIGHT_ENABLE | ||
| 37 | uint32_t layer_state_set_keymap(uint32_t state) { | ||
| 38 | rgblight_mode_noeeprom(1); | ||
| 39 | switch (biton32(state)) { | ||
| 40 | case _EDVORAKJ1: | ||
| 41 | case _EDVORAKJ2: | ||
| 42 | // _EDVORAKJ1 & J2 are same colored | ||
| 43 | rgblight_sethsv_noeeprom_white(); | ||
| 44 | break; | ||
| 45 | case _LOWER: | ||
| 46 | rgblight_sethsv_noeeprom_red(); | ||
| 47 | break; | ||
| 48 | case _RAISE: | ||
| 49 | rgblight_sethsv_noeeprom_blue(); | ||
| 50 | break; | ||
| 51 | case _ADJUST: | ||
| 52 | rgblight_sethsv_noeeprom_green(); | ||
| 53 | break; | ||
| 54 | default: // for any other layers, or the default layer | ||
| 55 | rgblight_mode_noeeprom(28); | ||
| 56 | rgblight_sethsv_noeeprom_red(); | ||
| 57 | break; | ||
| 58 | } | ||
| 59 | return state; | ||
| 60 | } | ||
| 61 | #endif | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c new file mode 100644 index 000000000..d8257d81f --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | #include "helix.h" | ||
| 2 | #include "keymap_xrows.h" | ||
| 3 | |||
| 4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 5 | |||
| 6 | [_EDVORAK] = LAYOUT_kc( | ||
| 7 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 8 | LBRC,RBRC,COMM,DOT , P , Y , F , G , R , W , Q ,BSLS, | ||
| 9 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 10 | EQL , A , O , E , I , U , D , T , N , S , M ,MINS, | ||
| 11 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 12 | QUOT,SCLN, X , C , V , Z , B , H , J , K , L ,SLSH, | ||
| 13 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 14 | LEFT,DOWN, UP ,RGHT,TMB1,TMB2,TMB3, TMB6,TMB7,TMB8,LEFT,DOWN, UP ,RGHT | ||
| 15 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 16 | ), | ||
| 17 | |||
| 18 | [_EDVORAKJ1] = LAYOUT_kc( | ||
| 19 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 20 | , AI , OU , EI , , , , , , , , , | ||
| 21 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 22 | , , , , , , , , , Y , , , | ||
| 23 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 24 | ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , | ||
| 25 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 26 | , , , , , , , , , , , , , | ||
| 27 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 28 | ), | ||
| 29 | |||
| 30 | [_EDVORAKJ2] = LAYOUT_kc( | ||
| 31 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 32 | , AI , OU , EI , , , , , , , , , | ||
| 33 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 34 | , , , , , , , Y , , , , , | ||
| 35 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 36 | ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , | ||
| 37 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 38 | , , , , , , , , , , , , , | ||
| 39 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 40 | ), | ||
| 41 | |||
| 42 | [_QWERTY] = LAYOUT_kc( | ||
| 43 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 44 | EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, | ||
| 45 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 46 | LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, | ||
| 47 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 48 | RBRC, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,BSLS, | ||
| 49 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 50 | , , , , , , , , , , , , , | ||
| 51 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 52 | ), | ||
| 53 | |||
| 54 | [_LOWER] = LAYOUT_kc( | ||
| 55 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 56 | F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS,SLSH, | ||
| 57 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 58 | F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS,ASTR, | ||
| 59 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 60 | F11 ,F12 ,PSCR,SLCK,PAUS,LBRC, RBRC, 1 , 2 , 3 , NO , NO , | ||
| 61 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 62 | HOME,PGDN,PGUP,END , , , , ,ESC , 0 ,HOME,PGDN,PGUP,END | ||
| 63 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 64 | ), | ||
| 65 | |||
| 66 | [_RAISE] = LAYOUT_kc( | ||
| 67 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 68 | F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , | ||
| 69 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 70 | TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, NO , | ||
| 71 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 72 | GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , NO , | ||
| 73 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 74 | HOME,PGDN,PGUP,END ,TMB9,ESC , , , , ,HOME,PGDN,PGUP,END | ||
| 75 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 76 | ), | ||
| 77 | |||
| 78 | [_ADJUST] = LAYOUT_kc( | ||
| 79 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 80 | , , , ,EXTOFF, , ,EXTON, , , , , | ||
| 81 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 82 | ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , | ||
| 83 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 84 | , , , , , , , , , , , , | ||
| 85 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 86 | , , , , , , , , , , , , , | ||
| 87 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 88 | ) | ||
| 89 | }; | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c new file mode 100644 index 000000000..9116b3966 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | #include "helix.h" | ||
| 2 | #include "keymap_xrows.h" | ||
| 3 | |||
| 4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 5 | |||
| 6 | [_EDVORAK] = LAYOUT_kc( | ||
| 7 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 8 | GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, | ||
| 9 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 10 | LBRC,RBRC,COMM,DOT , P , Y , F , G , R , W , Q ,BSLS, | ||
| 11 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 12 | EQL , A , O , E , I , U , D , T , N , S , M ,MINS, | ||
| 13 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 14 | QUOT,SCLN, X , C , V , Z ,TMB4, TMB5, B , H , J , K , L ,SLSH, | ||
| 15 | //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| | ||
| 16 | LEFT,DOWN, UP ,RGHT,TMB1,TMB2,TMB3, TMB6,TMB7,TMB8,LEFT,DOWN, UP ,RGHT | ||
| 17 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 18 | ), | ||
| 19 | |||
| 20 | [_EDVORAKJ1] = LAYOUT_kc( | ||
| 21 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 22 | , , , , , , , , , , , , | ||
| 23 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 24 | , AI , OU , EI , , , , , , , , , | ||
| 25 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 26 | , , , , , , , , , Y , , , | ||
| 27 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 28 | ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , | ||
| 29 | //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| | ||
| 30 | , , , , , , , , , , , , , | ||
| 31 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 32 | ), | ||
| 33 | |||
| 34 | [_EDVORAKJ2] = LAYOUT_kc( | ||
| 35 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 36 | , , , , , , , , , , , , | ||
| 37 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 38 | , AI , OU , EI , , , , , , , , , | ||
| 39 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 40 | , , , , , , , Y , , , , , | ||
| 41 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 42 | ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , | ||
| 43 | //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| | ||
| 44 | , , , , , , , , , , , , , | ||
| 45 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 46 | ), | ||
| 47 | |||
| 48 | [_QWERTY] = LAYOUT_kc( | ||
| 49 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 50 | GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, | ||
| 51 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 52 | EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, | ||
| 53 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 54 | LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, | ||
| 55 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 56 | RBRC, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,BSLS, | ||
| 57 | //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| | ||
| 58 | , , , , , , , , , , , , , | ||
| 59 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 60 | ), | ||
| 61 | |||
| 62 | [_LOWER] = LAYOUT_kc( | ||
| 63 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 64 | , , , , , , , ,SLSH,ASTR, , , | ||
| 65 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 66 | F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS, , | ||
| 67 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 68 | F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS, , | ||
| 69 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 70 | F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC, 1 , 2 , 3 , , , | ||
| 71 | //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| | ||
| 72 | HOME,PGDN,PGUP,END ,TMB9, , , , , 0 ,HOME,PGDN,PGUP,END | ||
| 73 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 74 | ), | ||
| 75 | |||
| 76 | [_RAISE] = LAYOUT_kc( | ||
| 77 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 78 | , , , , , , , ,SLSH,ASTR, , , | ||
| 79 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 80 | F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS, , | ||
| 81 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 82 | F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS, , | ||
| 83 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 84 | F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC, 1 , 2 , 3 , , , | ||
| 85 | //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| | ||
| 86 | HOME,PGDN,PGUP,END ,TMB9, , , , , 0 ,HOME,PGDN,PGUP,END | ||
| 87 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 88 | ), | ||
| 89 | |||
| 90 | [_ADJUST] = LAYOUT_kc( | ||
| 91 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 92 | , , , , , , , , , , , , | ||
| 93 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 94 | , , , ,EXTOFF, , ,EXTON, , , , , | ||
| 95 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 96 | ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , | ||
| 97 | //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| | ||
| 98 | , , , , , , , , , , , , , , | ||
| 99 | //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| | ||
| 100 | , , , , , , , , , , , , , | ||
| 101 | //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' | ||
| 102 | ) | ||
| 103 | }; | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h new file mode 100644 index 000000000..6a0e58102 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #ifndef KEYMAP_XROWS_H | ||
| 2 | #define KEYMAP_XROWS_H | ||
| 3 | |||
| 4 | #include "edvorakjp.h" | ||
| 5 | |||
| 6 | enum custom_keycodes { | ||
| 7 | KC_LOCK = NEW_SAFE_RANGE, | ||
| 8 | }; | ||
| 9 | |||
| 10 | #define KC_ KC_TRNS | ||
| 11 | |||
| 12 | #define KC_TMB1 LGUI_T(KC_TAB) | ||
| 13 | #define KC_TMB2 LSFT_T(KC_SPC) | ||
| 14 | #define KC_TMB3 LOWER // act as LOWER when hold, as KC_LANG2(=English) when tapped | ||
| 15 | #define KC_TMB4 LCTL_T(KC_ESC) | ||
| 16 | #define KC_TMB5 RSFT_T(KC_DEL) | ||
| 17 | #define KC_TMB6 RAISE // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped | ||
| 18 | #define KC_TMB7 RCTL_T(KC_BSPC) | ||
| 19 | #define KC_TMB8 RALT_T(KC_ENT) | ||
| 20 | #define KC_TMB9 LGUI(KC_TAB) | ||
| 21 | |||
| 22 | #define KC_RST RESET | ||
| 23 | #define KC_DBUG DEBUG | ||
| 24 | #define KC_RTOG RGB_TOG | ||
| 25 | #define KC_EDJP EDVORAK | ||
| 26 | #define KC_QWER QWERTY | ||
| 27 | |||
| 28 | #endif | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c new file mode 100644 index 000000000..5ced1d4fa --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | #include <string.h> | ||
| 2 | #include "oled.h" | ||
| 3 | |||
| 4 | static void render_logo(struct CharacterMatrix *matrix) { | ||
| 5 | |||
| 6 | static char logo[] = { | ||
| 7 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | ||
| 8 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
| 9 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, | ||
| 10 | 0}; | ||
| 11 | matrix_write(matrix, logo); | ||
| 12 | } | ||
| 13 | |||
| 14 | void matrix_update(struct CharacterMatrix *dest, | ||
| 15 | const struct CharacterMatrix *source) { | ||
| 16 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
| 17 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
| 18 | dest->dirty = true; | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | void render_status(struct CharacterMatrix *matrix) { | ||
| 23 | |||
| 24 | // Render to mode icon | ||
| 25 | static char logo[][2][3] = {{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; | ||
| 26 | if (edvorakjp_config.enable_kc_lang) { | ||
| 27 | matrix_write(matrix, logo[0][0]); | ||
| 28 | matrix_write_P(matrix, PSTR("\n")); | ||
| 29 | matrix_write(matrix, logo[0][1]); | ||
| 30 | } else { | ||
| 31 | matrix_write(matrix, logo[1][0]); | ||
| 32 | matrix_write_P(matrix, PSTR("\n")); | ||
| 33 | matrix_write(matrix, logo[1][1]); | ||
| 34 | } | ||
| 35 | |||
| 36 | // 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 | ||
| 37 | char buf[40]; | ||
| 38 | snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); | ||
| 39 | matrix_write_P(matrix, PSTR("\nLayer: ")); | ||
| 40 | switch (biton32(layer_state)) { | ||
| 41 | case L_BASE: | ||
| 42 | matrix_write_P(matrix, | ||
| 43 | default_layer_state == 1UL<<_EDVORAK ? PSTR("EDVORAK") : PSTR("QWERTY") | ||
| 44 | ); | ||
| 45 | break; | ||
| 46 | case _EDVORAKJ1: | ||
| 47 | case _EDVORAKJ2: | ||
| 48 | matrix_write_P(matrix, PSTR("JP_EXT")); | ||
| 49 | break; | ||
| 50 | case _RAISE: | ||
| 51 | matrix_write_P(matrix, PSTR("Raise")); | ||
| 52 | break; | ||
| 53 | case _LOWER: | ||
| 54 | matrix_write_P(matrix, PSTR("Lower")); | ||
| 55 | break; | ||
| 56 | case _ADJUST: | ||
| 57 | matrix_write_P(matrix, PSTR("Adjust")); | ||
| 58 | break; | ||
| 59 | default: | ||
| 60 | matrix_write(matrix, buf); | ||
| 61 | } | ||
| 62 | |||
| 63 | // Host Keyboard LED Status | ||
| 64 | char led[40]; | ||
| 65 | snprintf(led, sizeof(led), "\n%s %s %s %s", | ||
| 66 | edvorakjp_config.enable_jp_extra_layer && japanese_mode ? "EXT" : " ", | ||
| 67 | (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NMLK" : " ", | ||
| 68 | (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", | ||
| 69 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | ||
| 70 | matrix_write(matrix, led); | ||
| 71 | } | ||
| 72 | |||
| 73 | void iota_gfx_task_user(void) { | ||
| 74 | struct CharacterMatrix matrix; | ||
| 75 | |||
| 76 | #if DEBUG_TO_SCREEN | ||
| 77 | if (debug_enable) { return; } | ||
| 78 | #endif | ||
| 79 | |||
| 80 | matrix_clear(&matrix); | ||
| 81 | if (is_master) { | ||
| 82 | render_status(&matrix); | ||
| 83 | } else { | ||
| 84 | render_logo(&matrix); | ||
| 85 | } | ||
| 86 | matrix_update(&display, &matrix); | ||
| 87 | } | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.h b/keyboards/helix/rev2/keymaps/edvorakjp/oled.h new file mode 100644 index 000000000..421de2d81 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #ifndef OLED_USER_H | ||
| 2 | #define OLED_USER_H | ||
| 3 | |||
| 4 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h | ||
| 5 | #include "ssd1306.h" | ||
| 6 | #include "edvorakjp.h" | ||
| 7 | |||
| 8 | //assign the right code to your layers for OLED display | ||
| 9 | #define L_BASE 0 | ||
| 10 | |||
| 11 | extern uint8_t is_master; | ||
| 12 | extern bool japanese_mode; | ||
| 13 | |||
| 14 | void matrix_update(struct CharacterMatrix *dest, | ||
| 15 | const struct CharacterMatrix *source); | ||
| 16 | void render_status(struct CharacterMatrix *matrix); | ||
| 17 | void iota_gfx_task_user(void); | ||
| 18 | |||
| 19 | #endif // OLED_CONFIG_USER_H | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/readme.md b/keyboards/helix/rev2/keymaps/edvorakjp/readme.md new file mode 100644 index 000000000..dd406523d --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/readme.md | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # edvorakjp | ||
| 2 | |||
| 3 | Epaew's Enhanced Dvorak layout for Japanese Programmer | ||
| 4 | see [here](/users/edvorakjp) for more informations. | ||
| 5 | |||
| 6 | ## License | ||
| 7 | |||
| 8 | Copyright 2018 Ryo Maeda epaew.333@gmail.com @epaew | ||
| 9 | |||
| 10 | This program is free software: you can redistribute it and/or modify | ||
| 11 | it under the terms of the GNU General Public License as published by | ||
| 12 | the Free Software Foundation, either version 2 of the License, or | ||
| 13 | (at your option) any later version. | ||
| 14 | |||
| 15 | This program is distributed in the hope that it will be useful, | ||
| 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | GNU General Public License for more details. | ||
| 19 | |||
| 20 | You should have received a copy of the GNU General Public License | ||
| 21 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk new file mode 100644 index 000000000..d8fc35c48 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk | |||
| @@ -0,0 +1,126 @@ | |||
| 1 | # Build Options | ||
| 2 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 3 | # the appropriate keymap folder that will get included automatically | ||
| 4 | # | ||
| 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 6 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 7 | EXTRAKEY_ENABLE = no # Audio control and System control(+450) | ||
| 8 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 9 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 10 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 12 | MIDI_ENABLE = no # MIDI controls | ||
| 13 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 14 | UNICODE_ENABLE = no # Unicode | ||
| 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 16 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 17 | SWAP_HANDS_ENABLE = no # Enable one-hand typing | ||
| 18 | |||
| 19 | define HELIX_CUSTOMISE_MSG | ||
| 20 | $(info Helix customize) | ||
| 21 | $(info - OLED_ENABLE=$(OLED_ENABLE)) | ||
| 22 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | ||
| 23 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | ||
| 24 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | ||
| 25 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | ||
| 26 | endef | ||
| 27 | |||
| 28 | # Helix keyboard customize | ||
| 29 | # you can edit follows 7 Variables | ||
| 30 | # jp: 以下の7つの変数を必要に応じて編集します。 | ||
| 31 | HELIX_ROWS = 5 # Helix Rows is 4 or 5 | ||
| 32 | OLED_ENABLE = no # OLED_ENABLE | ||
| 33 | LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" instead of "common/glcdfont.c" | ||
| 34 | LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) | ||
| 35 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) | ||
| 36 | LED_ANIMATIONS = yes # LED animations | ||
| 37 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
| 38 | |||
| 39 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | ||
| 40 | #### Do not enable these with audio at the same time. | ||
| 41 | |||
| 42 | ### Helix keyboard 'edvorakjp' keymap: convenient command line option | ||
| 43 | ## make HELIX=<options> helix:edvorakjp | ||
| 44 | ## option= oled | back | under | na | ios | ||
| 45 | ## ex. | ||
| 46 | ## make HELIX=oled helix:edvorakjp | ||
| 47 | ## make HELIX=oled,back helix:edvorakjp | ||
| 48 | ## make HELIX=oled,under helix:edvorakjp | ||
| 49 | ## make HELIX=oled,back,na helix:edvorakjp | ||
| 50 | ## make HELIX=oled,back,ios helix:edvorakjp | ||
| 51 | ## | ||
| 52 | ifneq ($(strip $(HELIX)),) | ||
| 53 | ifeq ($(findstring oled,$(HELIX)), oled) | ||
| 54 | OLED_ENABLE = yes | ||
| 55 | endif | ||
| 56 | ifeq ($(findstring back,$(HELIX)), back) | ||
| 57 | LED_BACK_ENABLE = yes | ||
| 58 | else ifeq ($(findstring under,$(HELIX)), under) | ||
| 59 | LED_UNDERGLOW_ENABLE = yes | ||
| 60 | endif | ||
| 61 | ifeq ($(findstring na,$(HELIX)), na) | ||
| 62 | LED_ANIMATIONS = no | ||
| 63 | endif | ||
| 64 | ifeq ($(findstring ios,$(HELIX)), ios) | ||
| 65 | IOS_DEVICE_ENABLE = yes | ||
| 66 | endif | ||
| 67 | $(eval $(call HELIX_CUSTOMISE_MSG)) | ||
| 68 | $(info ) | ||
| 69 | endif | ||
| 70 | |||
| 71 | # Uncomment these for checking | ||
| 72 | # jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 | ||
| 73 | # $(eval $(call HELIX_CUSTOMISE_MSG)) | ||
| 74 | # $(info ) | ||
| 75 | |||
| 76 | ifeq ($(strip $(HELIX_ROWS)), 4) | ||
| 77 | SRC += keymap_4rows.c | ||
| 78 | else ifeq ($(strip $(HELIX_ROWS)), 5) | ||
| 79 | SRC += keymap_5rows.c | ||
| 80 | else | ||
| 81 | $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) | ||
| 82 | endif | ||
| 83 | OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) | ||
| 84 | |||
| 85 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | ||
| 86 | RGBLIGHT_ENABLE = yes | ||
| 87 | OPT_DEFS += -DRGBLED_BACK | ||
| 88 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
| 89 | $(eval $(call HELIX_CUSTOMISE_MSG)) | ||
| 90 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | ||
| 91 | endif | ||
| 92 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
| 93 | RGBLIGHT_ENABLE = yes | ||
| 94 | OPT_DEFS += -DRGBLED_BACK | ||
| 95 | else | ||
| 96 | RGBLIGHT_ENABLE = no | ||
| 97 | endif | ||
| 98 | |||
| 99 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | ||
| 100 | OPT_DEFS += -DIOS_DEVICE_ENABLE | ||
| 101 | endif | ||
| 102 | |||
| 103 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | ||
| 104 | OPT_DEFS += -DRGBLIGHT_ANIMATIONS | ||
| 105 | endif | ||
| 106 | |||
| 107 | ifeq ($(strip $(OLED_ENABLE)), yes) | ||
| 108 | OPT_DEFS += -DOLED_ENABLE | ||
| 109 | SRC += oled.c | ||
| 110 | endif | ||
| 111 | |||
| 112 | ifeq ($(strip $(LOCAL_GLCDFONT)), yes) | ||
| 113 | OPT_DEFS += -DLOCAL_GLCDFONT | ||
| 114 | endif | ||
| 115 | |||
| 116 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 117 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 118 | |||
| 119 | ifndef QUANTUM_DIR | ||
| 120 | include ../../../../Makefile | ||
| 121 | endif | ||
| 122 | |||
| 123 | # Uncomment these for debugging | ||
| 124 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) | ||
| 125 | # $(info -- OPT_DEFS=$(OPT_DEFS)) | ||
| 126 | # $(info ) | ||
diff --git a/keyboards/iris/keymaps/edvorakjp/keymap.c b/keyboards/iris/keymaps/edvorakjp/keymap.c index 49d8d9afd..74aff9131 100644 --- a/keyboards/iris/keymaps/edvorakjp/keymap.c +++ b/keyboards/iris/keymaps/edvorakjp/keymap.c | |||
| @@ -4,8 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #include "edvorakjp.h" | 5 | #include "edvorakjp.h" |
| 6 | 6 | ||
| 7 | extern edvorakjp_config_t edvorakjp_config; | ||
| 8 | |||
| 9 | enum custom_keycodes { | 7 | enum custom_keycodes { |
| 10 | KC_LOCK = NEW_SAFE_RANGE, | 8 | KC_LOCK = NEW_SAFE_RANGE, |
| 11 | }; | 9 | }; |
diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h index c38a9d1fa..f67400686 100644 --- a/users/edvorakjp/edvorakjp.h +++ b/users/edvorakjp/edvorakjp.h | |||
| @@ -15,6 +15,7 @@ typedef union { | |||
| 15 | bool enable_kc_lang : 1; // for macOS | 15 | bool enable_kc_lang : 1; // for macOS |
| 16 | }; | 16 | }; |
| 17 | } edvorakjp_config_t; | 17 | } edvorakjp_config_t; |
| 18 | extern edvorakjp_config_t edvorakjp_config; | ||
| 18 | 19 | ||
| 19 | enum edvorakjp_layers { | 20 | enum edvorakjp_layers { |
| 20 | _EDVORAK = 0, | 21 | _EDVORAK = 0, |
