aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/crkbd/keymaps/edvorakjp
diff options
context:
space:
mode:
authorGravatar epaew <epaew@users.noreply.github.com>2019-03-10 01:22:21 +0900
committerGravatar MechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-03-09 08:22:21 -0800
commit9d915ed051c43edd828d6cdb784a5d094e9b312d (patch)
tree26e12a4eece02daa1aab74946868f0a01fc87db8 /keyboards/crkbd/keymaps/edvorakjp
parentcd9e15036e692477d37a3c1a82c5ba1f29b8a11e (diff)
downloadqmk_firmware-9d915ed051c43edd828d6cdb784a5d094e9b312d.tar.gz
Update edvorak keymap simplify (#5350)
* Update edvorakjp layouts * swap master hand * update tapping_term
Diffstat (limited to 'keyboards/crkbd/keymaps/edvorakjp')
-rw-r--r--keyboards/crkbd/keymaps/edvorakjp/config.h7
-rw-r--r--keyboards/crkbd/keymaps/edvorakjp/keymap.c140
-rw-r--r--keyboards/crkbd/keymaps/edvorakjp/oled.c18
3 files changed, 50 insertions, 115 deletions
diff --git a/keyboards/crkbd/keymaps/edvorakjp/config.h b/keyboards/crkbd/keymaps/edvorakjp/config.h
index 515591a42..b8662aca0 100644
--- a/keyboards/crkbd/keymaps/edvorakjp/config.h
+++ b/keyboards/crkbd/keymaps/edvorakjp/config.h
@@ -3,15 +3,16 @@
/* Select hand configuration */
-#define MASTER_LEFT
-// #define MASTER_RIGHT
+// #define MASTER_LEFT
+#define MASTER_RIGHT
// #define EE_HANDS
#define SSD1306OLED
#define SWAP_SCLN
// #define TAPPING_FORCE_HOLD
-#define TAPPING_TERM 120
+#define TAPPING_TERM 300
+#define IGNORE_MOD_TAP_INTERRUPT
#undef RGBLED_NUM
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
diff --git a/keyboards/crkbd/keymaps/edvorakjp/keymap.c b/keyboards/crkbd/keymaps/edvorakjp/keymap.c
index ae2f710a0..32001f22d 100644
--- a/keyboards/crkbd/keymaps/edvorakjp/keymap.c
+++ b/keyboards/crkbd/keymaps/edvorakjp/keymap.c
@@ -16,113 +16,61 @@
#define KC_ KC_TRNS
-#define KC_TMB1 LGUI_T(KC_TAB)
-#define KC_TMB2 LSFT_T(KC_SPC)
+#define KC_TMB1 KC_LA(TAB)
+#define KC_TMB2 KC_LS(SPC)
#define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped
#define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped
-#define KC_TMB5 RCTL_T(KC_BSPC)
-#define KC_TMB6 RALT_T(KC_ENT)
-#define KC_TMB7 KC_DEL
-#define KC_TMB8 RALT(KC_ENT)
-#define KC_TMB9 LGUI(KC_TAB)
-
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_EDJP EDVORAK
-#define KC_QWER QWERTY
+#define KC_TMB5 KC_RC(BSPC)
+#define KC_TMB6 KC_RG(ENT)
+#define KC_TMB7 KC_RC(DEL)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_EDVORAK] = LAYOUT_kc(
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ESC ,QUOT,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- EQL , A , O , E , I , U , D , T , N , S , M ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- GRV ,SCLN, X , C , V , Z , B , H , J , K , L ,SLSH,
- //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
- TMB1,TMB2,TMB3, TMB4,TMB5,TMB6
- // `----+----+----' `----+----+----'
- ),
-
- [_EDVORAKJ1] = LAYOUT_kc(
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , AI , OU , EI , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , Y , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , ,
- //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_EDVORAKJ2] = LAYOUT_kc(
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , AI , OU , EI , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , Y , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , ,
- //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_QWERTY] = LAYOUT_kc(
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- EQL , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- GRV , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,BSLS,
- //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
+ //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
+ GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS,
+ //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
+ EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS,
+ //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
+ ESC ,SCLN, X , C , V , Z , H , J , K , L , B ,SLSH,
+ //`----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----'
+ TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6
+ // `-----+----+----' `----+----+-----'
),
[_LOWER] = LAYOUT_kc(
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , 1 ,EXLM, AT ,HASH,DLR , PERC,CIRC,AMPR,ASTR, 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , LT ,LCBR,LPRN,LBRC, RBRC,RPRN,RCBR, GT , , ,
- //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
- , , , ,TMB7,TMB8
- // `----+----+----' `----+----+----'
+ //|----+----+------+------+------+----| |----+------+------+-------+----+----|
+ , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , ,
+ //|----+----+------+------+------+----| |----+------+------+-------+----+----|
+ F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 ,
+ //|----+----+------+------+------+----| |----+------+------+-------+----+----|
+ PSCR, , HOME , PGDN , PGUP ,END , LEFT, DOWN , UP , RGHT , , ,
+ //`----+----+------+------+------+----+----| |----+----+------+------+-------+----+----'
+ , , NO , MAC ,TMB7,
+ // `-----+----+----' `----+----+-----'
),
[_RAISE] = LAYOUT_kc(
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,F11 ,F12 ,PSCR,SLCK,PAUS, ,HOME,PGDN,PGUP,END , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , ,LEFT,DOWN, UP ,RGHT, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
- TMB9, , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , ,EXTOFF, , ,EXTON, , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , ,QWER,WIN ,RST , RTOG,MAC ,EDJP, , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
+ //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
+ , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , ,
+ //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
+ , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , ,
+ //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
+ PSCR, ,HOME ,PGDN ,PGUP ,END , LEFT,DOWN , UP ,RGHT , , ,
+ //`----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----'
+ , ,WIN , NO , ,
+ // `-----+----+----' `----+----+----'
)
};
#ifdef SSD1306OLED
void matrix_init_keymap(void) {
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
- iota_gfx_init(!has_usb()); // turns on the display
+#ifdef MASTER_RIGHT
+ iota_gfx_init(has_usb()); // turns on the display
+#else
+ iota_gfx_init(!has_usb());
+#endif // MASTER_RIGHT
}
void matrix_scan_user(void) {
@@ -134,23 +82,15 @@ void matrix_scan_user(void) {
uint32_t layer_state_set_keymap(uint32_t state) {
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
switch (biton32(state)) {
- case _EDVORAKJ1:
- case _EDVORAKJ2:
- // _EDVORAKJ1 & J2 are same colored
- rgblight_sethsv_noeeprom_white();
- break;
case _LOWER:
rgblight_sethsv_noeeprom_red();
break;
case _RAISE:
- rgblight_sethsv_noeeprom_blue();
- break;
- case _ADJUST:
rgblight_sethsv_noeeprom_green();
break;
- default: // for any other layers, or the default layer
- rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
- rgblight_sethsv_noeeprom_red();
+ default: // for any other layers, or the default layer
+ rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
+ rgblight_sethsv_red();
break;
}
return state;
diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c
index e4cccf3e7..cbb43d061 100644
--- a/keyboards/crkbd/keymaps/edvorakjp/oled.c
+++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c
@@ -21,11 +21,7 @@ const char *read_layer_state(void) {
switch (biton32(layer_state)) {
case L_BASE:
- strcpy(layer_name, default_layer_state == 1UL<<_EDVORAK ? "EDVORAK" : "QWERTY");
- break;
- case _EDVORAKJ1:
- case _EDVORAKJ2:
- strcpy(layer_name, "JP_EXT");
+ strcpy(layer_name, "Default");
break;
case _RAISE:
strcpy(layer_name, "Raise");
@@ -33,9 +29,6 @@ const char *read_layer_state(void) {
case _LOWER:
strcpy(layer_name, "Lower");
break;
- case _ADJUST:
- strcpy(layer_name, "Adjust");
- break;
default:
snprintf(layer_name, sizeof(layer_name), "Undef-%ld", layer_state);
}
@@ -49,10 +42,7 @@ const char *read_layer_state(void) {
const char *read_host_led_state(void) {
static char led_str[24];
- bool ext_status = get_enable_jp_extra_layer() && get_japanese_mode();
- strcpy(led_str, ext_status ? "EXT" : " ");
-
- strcat(led_str, (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? " NMLK" : " ");
+ strcpy(led_str, (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NMLK" : " ");
strcat(led_str, (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? " CAPS" : " ");
strcat(led_str, (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? " SCLK" : " ");
return led_str;
@@ -70,7 +60,11 @@ void iota_gfx_task_user(void) {
struct CharacterMatrix matrix;
matrix_clear(&matrix);
+#ifdef MASTER_RIGHT
+ if (!is_master) {
+#else
if (is_master) {
+#endif // MASTER_RIGHT
matrix_write(&matrix, read_mode_icon(!get_enable_kc_lang()));
matrix_write(&matrix, " ");
matrix_write(&matrix, read_layer_state());