Mercurial > crkbdyaz
changeset 7:b9fe776c0227 draft default tip
- add eucalyn layout and eucalyn-mac layout
- add layer switch keys to _ADJUST layer
- minor fixes
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 21 Feb 2019 13:47:25 +0900 |
parents | 7b9e0c974769 |
children | |
files | keymap.c |
diffstat | 1 files changed, 43 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/keymap.c Tue Feb 19 12:43:24 2019 +0900 +++ b/keymap.c Thu Feb 21 13:47:25 2019 +0900 @@ -23,8 +23,10 @@ // entirely and just use numbers. #define _QWERTY 0 #define _MAC 1 -#define _LOWER 3 -#define _RAISE 4 +#define _ECLN 2 +#define _ECLNMAC 3 +#define _LOWER 4 +#define _RAISE 5 #define _ADJUST 16 enum custom_keycodes { @@ -80,6 +82,10 @@ #define KC_NAPP NAPP #define KC_NWIN NWIN +#define KC_L1 TO(_QWERTY) +#define KC_L2 TO(_MAC) +#define KC_L3 TO(_ECLN) +#define KC_L4 TO(_ECLNMAC) #define SS_RGUI(string) SS_DOWN(X_RGUI) string SS_UP(X_RGUI) @@ -110,6 +116,30 @@ //`--------------------' `--------------------' ), + [_ECLN] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, MINS,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CLESC, A, O, E, I, U, G, T, K, S, N, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, F, N, M, J, L, SLSH, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, LALT, ENT, BSPC, RAISE \ + //`--------------------' `--------------------' + ), + + [_ECLNMAC] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, MINS,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CLESC, A, O, E, I, U, G, T, K, S, N, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, F, N, M, J, L, SLSH, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, LGUI, ENT, BSPC, RAISE \ + //`--------------------' `--------------------' + ), + [_LOWER] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. PLUS, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSLS,\ @@ -138,9 +168,9 @@ //,-----------------------------------------. ,-----------------------------------------. F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - XXXXX, SSCR, SWIN, XXXXX, XXXXX, XXXXX, XXXXX, MUTE, VOLD, VOLU, XXXXX, XXXXX,\ + XXXXX, SSCR, SWIN, XXXXX, XXXXX, L1, L3, MUTE, VOLD, VOLU, XXXXX, XXXXX,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - RST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MRWD, MPLY, MFFD, XXXXX, RST,\ + RST, XXXXX, XXXXX, XXXXX, XXXXX, L2, L4, MRWD, MPLY, MFFD, XXXXX, RST,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| LOWER, SPC, LALT, ENT, BSPC, RAISE \ //`--------------------' `--------------------' @@ -303,12 +333,14 @@ if(record->event.pressed) { SEND_STRING(SS_LCTRL(SS_TAP(X_TAB))); } + return false; break; case LTAB: //ctrl-shift-tab if(record->event.pressed) { SEND_STRING(SS_LSFT(SS_LCTRL(SS_TAP(X_TAB)))); } + return false; break; case RSPC: //ctrl-right @@ -321,42 +353,49 @@ if(record->event.pressed) { SEND_STRING(SS_LCTRL(SS_TAP(X_LEFT))); } + return false; break; case USPC: //ctrl-up if(record->event.pressed) { SEND_STRING(SS_LCTRL(SS_TAP(X_UP))); } + return false; break; case DSPC: //ctrl-down if(record->event.pressed) { SEND_STRING(SS_LCTRL(SS_TAP(X_DOWN))); } + return false; break; case SSCR: //shift-cmd-3 if(record->event.pressed) { SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_3)))); } + return false; break; case SWIN: //shift-cmd-4 if(record->event.pressed) { SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_4)))); } + return false; break; case NAPP: //cmd-tab if(record->event.pressed) { SEND_STRING(SS_RGUI(SS_TAP(X_TAB))); } + return false; break; case NWIN: //cmd-grave if(record->event.pressed) { SEND_STRING(SS_RGUI(SS_TAP(X_GRAVE))); } + return false; break; #if 0