aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/README.md2
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c57
2 files changed, 33 insertions, 26 deletions
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md
index 37c2be6f9..ddeaed939 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/README.md
+++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md
@@ -13,7 +13,7 @@ Main layer modifications from default Planck layout:
13* Lower & Raise is now called Num and Fun. 13* Lower & Raise is now called Num and Fun.
14* OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet) 14* OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet)
15 15
16On Promethium, Trackpoint is enabled on PD2 and PD2. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). 16On Promethium, Trackpoint is enabled on PD2 and PD3. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification).
17 17
18AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr. 18AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr.
19 19
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index 2c43f9884..cf7c67339 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -51,8 +51,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
51#define KC_WWWF KC_WWW_FORWARD 51#define KC_WWWF KC_WWW_FORWARD
52 52
53// hybrid right-alt & scroll lock (mapped to Compose in OS) 53// hybrid right-alt & scroll lock (mapped to Compose in OS)
54#undef KC_RALT 54#define C_RALT MT(MOD_RALT, KC_SLCK)
55#define KC_RALT MT(MOD_RALT, KC_SLCK) 55
56// dual use right-shift & del key
57// #define C_RSFT MT(MOD_RSFT, KC_DEL)
56 58
57bool capslock = false; 59bool capslock = false;
58#ifdef DOUBLESPACE_LAYER_ENABLE 60#ifdef DOUBLESPACE_LAYER_ENABLE
@@ -572,7 +574,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
572 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, 574 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
573 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , 575 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT ,
574 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, 576 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
575 KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL 577 KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL
576), 578),
577 579
578/* Dvorak 580/* Dvorak
@@ -664,16 +666,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
664 * |------+------+------+------+------+-------------+------+------+------+------+------| 666 * |------+------+------+------+------+-------------+------+------+------+------+------|
665 * | | * | \ | - | = | / | ≠ | ( | ) | < | > | | 667 * | | * | \ | - | = | / | ≠ | ( | ) | < | > | |
666 * |------+------+------+------+------+------|------+------+------+------+------+------| 668 * |------+------+------+------+------+------|------+------+------+------+------+------|
667 * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | : | 669 * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | |
668 * |------+------+------+------+------+------+------+------+------+------+------+------| 670 * |------+------+------+------+------+------+------+------+------+------+------+------|
669 * | | | | | | | | | | | | 671 * | | | | | | | | | | : | |
670 * `-----------------------------------------------------------------------------------' 672 * `-----------------------------------------------------------------------------------'
671 */ 673 */
672[_PUNC] = KEYMAP( 674[_PUNC] = KEYMAP(
673 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, 675 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______,
674 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, 676 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______,
675 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, 677 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______,
676 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 678 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______
677), 679),
678 680
679/* Num 681/* Num
@@ -682,33 +684,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
682 * |------+------+------+------+------+-------------+------+------+------+------+------| 684 * |------+------+------+------+------+-------------+------+------+------+------+------|
683 * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | | 685 * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | |
684 * |------+------+------+------+------+------|------+------+------+------+------+------| 686 * |------+------+------+------+------+------|------+------+------+------+------+------|
685 * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | 687 * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | |
686 * |------+------+------+------+------+------+------+------+------+------+------+------| 688 * |------+------+------+------+------+------+------+------+------+------+------+------|
687 * | | | | | | | | 0 | , | . | x | | 689 * | | | x | | | | | 0 | , | . | : | |
688 * `-----------------------------------------------------------------------------------' 690 * `-----------------------------------------------------------------------------------'
689 */ 691 */
690[_NUM] = KEYMAP( 692[_NUM] = KEYMAP(
691 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, 693 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______,
692 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, 694 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______,
693 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, 695 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), _______,
694 _______, _______, _______, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_X, _______ 696 _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______
695), 697),
696 698
697/* Func 699/* Func
698 * ,-----------------------------------------------------------------------------------. 700 * ,-----------------------------------------------------------------------------------.
699 * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | 701 * | | F1 | F2 | F3 | F4 | Ins | | PgUp | Up | PgDn | PgUp | |
700 * |------+------+------+------+------+-------------+------+------+------+------+------| 702 * |------+------+------+------+------+-------------+------+------+------+------+------|
701 * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | 703 * | Caps | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | |
702 * |------+------+------+------+------+------|------+------+------+------+------+------| 704 * |------+------+------+------+------+------|------+------+------+------+------+------|
703 * | | F9 | F10 | F11 | F12 | | | | Home | End | | | 705 * | | F9 | F10 | F11 | F12 |Pause | | | Home | End | | |
704 * |------+------+------+------+------+------+------+------+------+------+------+------| 706 * |------+------+------+------+------+------+------+------+------+------+------+------|
705 * | | | | | | | | | | | | 707 * | | | | | | | | | | | |
706 * `-----------------------------------------------------------------------------------' 708 * `-----------------------------------------------------------------------------------'
707 */ 709 */
708[_FUN] = KEYMAP( 710[_FUN] = KEYMAP(
709 XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, 711 XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL,
710 XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, 712 KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______,
711 _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, 713 _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______,
712 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 714 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
713), 715),
714 716
@@ -933,7 +935,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
933#endif 935#endif
934 936
935 // handle greek layer shift 937 // handle greek layer shift
936 // handle both shift = capslock
937 case KC_LSFT: 938 case KC_LSFT:
938 case KC_RSFT: 939 case KC_RSFT:
939 ; 940 ;
@@ -947,13 +948,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
947 layer_off(_GREEKU); 948 layer_off(_GREEKU);
948 } 949 }
949 } 950 }
950 } else {
951 if (record->event.pressed) {
952 if (lshift ^ rshift) { // if only one shift was pressed
953 register_code(KC_CAPS);
954 unregister_code(KC_CAPS);
955 }
956 }
957 } 951 }
958 return true; 952 return true;
959 break; 953 break;
@@ -1044,6 +1038,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1044 break; 1038 break;
1045#endif 1039#endif
1046 1040
1041 // only process Fnumber on key release, and only when layer switcher is still pressed.
1042 // this is to avoid accidental presses on potentially destructive keys
1043 case KC_F1 ... KC_F12:
1044 case KC_PAUS:
1045 case KC_PSCR:
1046 case KC_INS:
1047 if (!record->event.pressed && layer == _FUN) { // key released and still in FUN layer
1048 register_code(keycode);
1049 unregister_code(keycode);
1050 }
1051 return false;
1052 break;
1053
1047 // layer switcher 1054 // layer switcher
1048 // 1055 //
1049 case GREEK: 1056 case GREEK: