diff options
author | Luke Stanley <lukexorz@users.noreply.github.com> | 2018-09-05 15:45:19 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-09-05 13:45:19 -0700 |
commit | 155850187de7897dcd8f216d704fecce446f0a68 (patch) | |
tree | 35e7c1005cdf481e0d57173642684b5a16c95012 /keyboards | |
parent | 2b09900bdc7f93d917cfd159f5e3b045612a7b85 (diff) |
Keyboard: Add IBM 122-key Terminal keyboard and my Ergodox EZ keymap (Programmer's Dvorak + Gaming/QWERTY layer) (#3850)
* added my lukaus keymap (programmers dvorak with QWERTY, function, and mouse/keypad layers)
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* added my lukaus keymap (programmers dvorak with QWERTY, function, and mouse/keypad layers)
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* Add keyboard information and separated my custom layout from the default
* Add readme to Lukaus' Ergodox EZ keymap
* added my lukaus keymap (programmers dvorak with QWERTY, function, and mouse/keypad layers)
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* added my lukaus keymap (programmers dvorak with QWERTY, function, and mouse/keypad layers)
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* Add keyboard information and separated my custom layout from the default
* Add readme to Lukaus' Ergodox EZ keymap
* added my lukaus keymap (programmers dvorak with QWERTY, function, and mouse/keypad layers)
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* Fix merge conflict again?
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* Add keyboard information and separated my custom layout from the default
* Add readme to Lukaus' Ergodox EZ keymap
* added my lukaus keymap (programmers dvorak with QWERTY, function, and mouse/keypad layers)
* added my lukaus keymap (programmers dvorak with QWERTY, function, and mouse/keypad layers)
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* updated ergodox_ez keymap and initial commit for IBM Model M 122 key
* Add keyboard information and separated my custom layout from the default
* update keymap
* Update rules.mk to remove redundant commented line
* Fix missing key on default layout for IBM Model M 122 key
* Fix issues identified by drashna and noroadsleft
* Update readme for IBM 122 key
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/ergodox_ez/keymaps/lukaus/config.h | 16 | ||||
-rw-r--r-- | keyboards/ergodox_ez/keymaps/lukaus/keymap.c | 843 | ||||
-rw-r--r-- | keyboards/ergodox_ez/keymaps/lukaus/readme.md | 3 | ||||
-rw-r--r-- | keyboards/ergodox_ez/keymaps/lukaus/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/config.h | 190 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/ibm122m.c | 43 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/ibm122m.h | 42 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/info.json | 0 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/keymaps/default/config.h | 19 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/keymaps/default/keymap.c | 46 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/keymaps/default/readme.md | 2 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/keymaps/lukaus/config.h | 19 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/keymaps/lukaus/keymap.c | 587 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/keymaps/lukaus/readme.md | 2 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/readme.md | 16 | ||||
-rw-r--r-- | keyboards/handwired/ibm122m/rules.mk | 67 |
16 files changed, 1896 insertions, 0 deletions
diff --git a/keyboards/ergodox_ez/keymaps/lukaus/config.h b/keyboards/ergodox_ez/keymaps/lukaus/config.h new file mode 100644 index 0000000000..2b93445378 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/config.h @@ -0,0 +1,16 @@ +#pragma once +#define CONFIG_USER_H + +#define TAPPING_TERM 200 + +#ifdef RGBLIGHT_ENABLE +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#endif // RGBLIGHT_ENABLE + +#define FORCE_NKRO + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) diff --git a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c new file mode 100644 index 0000000000..40156b3ff3 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c @@ -0,0 +1,843 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#include "keymap_german.h" + +#include "keymap_nordic.h" + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + + // Programmer's Dvorak "macros" : + // To be paired with get_mods to enable both + // Shift functionality and Programmer's Dvorak + + DVP_ESC, // Grave escape basically i think + DVP_AMPR, + DVP_LBRACKET, + DVP_LCBR, + DVP_RCBR, + DVP_LPRN, + DVP_AT, + + DVP_EQUAL, + DVP_ASTERISK, + DVP_RPRN, + DVP_PLUS, + DVP_RBRACKET, + DVP_EXLM, + DVP_HASH, + + RU_2, + RU_3, + RU_4, + RU_6, + RU_7, + RU_DOT, + + SHFT_COMMA, + SHFT_DOT, + + RGB_SLD, + RGB_FF0000, + RGB_008000, + RGB_0000FF, + RGB_FFFFFF, + RGB_800080 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Programmer's Dvorak layer + [0] = LAYOUT_ergodox( + DVP_ESC, DVP_AMPR, DVP_LBRACKET, DVP_LCBR, DVP_RCBR, DVP_LPRN, DVP_AT, + KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, MO(4), + MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSHIFT, KC_QUOTE, KC_Q, KC_J, KC_K, KC_X, KC_HYPR, + KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_C), LCTL(KC_V), + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, MO(4), KC_END, + + DVP_EQUAL, DVP_ASTERISK, DVP_RPRN, DVP_PLUS, DVP_RBRACKET, DVP_EXLM, DVP_HASH, + TT(4), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_MEH, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(3), + KC_DELETE, KC_BSLASH, KC_RGUI, KC_RCTL, LCTL(KC_F), + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ), + // Gaming QWERTY layer + [1] = LAYOUT_ergodox( + KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F14, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F23, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F24, + KC_LCTL, KC_F8, KC_LALT, KC_F14, KC_F13, + + KC_HOME, TO(0), KC_F15, KC_SPACE, KC_LCTL, KC_LALT, + + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, + KC_F24, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, + KC_F17, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, + KC_DELETE, KC_F19, KC_LGUI, KC_F21, KC_F22, + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ), + [2] = LAYOUT_ergodox( + KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_C, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TO(0), + MO(3), KC_1, KC_2, KC_3, KC_4, KC_5, + KC_LSHIFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_LCTL, KC_F8, KC_LALT, KC_I, KC_S, + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, + + KC_NO, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_NO, KC_NO, + TO(0), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_NO, KC_NO, + KC_KP_4, KC_KP_5, KC_KP_6, KC_EQUAL, KC_NO, KC_NO, + KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_NO, KC_NO, + KC_KP_0, KC_KP_DOT, KC_NO, KC_NO, KC_NO, + + TO(0), KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ), + // Function Layer + [3] = LAYOUT_ergodox( + KC_DLR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_MEDIA_PREV_TRACK,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_NEXT_TRACK,KC_NO, TT(4), + KC_TRANSPARENT, KC_TRANSPARENT, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, KC_TRANSPARENT, + KC_LSHIFT, LALT(KC_Z), KC_TRANSPARENT, KC_TRANSPARENT, KC_F12, KC_TRANSPARENT, ALL_T(KC_NO), + KC_LCTL, KC_LALT, KC_LGUI, KC_CAPSLOCK, LSFT(KC_F12), + + KC_PSCREEN, KC_PGUP, KC_PGDOWN, KC_SPACE, KC_LSHIFT, KC_INSERT, + + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_NO, KC_HOME, KC_TRANSPARENT, KC_PSCREEN, KC_SLCK, KC_TRANSPARENT, KC_TRANSPARENT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRANSPARENT, KC_TRANSPARENT, + MEH_T(KC_NO), KC_CALCULATOR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_RSHIFT, + KC_DELETE, KC_INSERT, KC_TRANSPARENT, KC_F19, KC_RCTL, + + TO(2),KC_TRANSPARENT,KC_TRANSPARENT,LALT(KC_F10),KC_ENTER,KC_BSPACE + ), + // Keypad, Lighting, and Mouse emulation layer + ///* + [4] = LAYOUT_ergodox( + KC_ESCAPE, KC_NO, KC_NO, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_NO, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_WH_UP, TO(0), + KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, + KC_LSHIFT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, TO(5), + KC_LCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, + + KC_NO, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_CALCULATOR, KC_NO, RGB_VAI, + TO(0), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS, KC_NO, RGB_VAD, + KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_NO, RGB_HUI, + KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, RGB_SLD, RGB_HUD, + KC_KP_0, KC_KP_DOT, KC_KP_ENTER, RGB_MOD, RGB_TOG, + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ) + //*/ + /* + // Keypad, Lighting, and Mouse emulation layer + [4] = KEYMAP( + KC_ESCAPE, KC_NO, KC_NO, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_NO, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_WH_UP, TO(0), + KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, + KC_LSHIFT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, TO(5), + KC_LCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, + + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, + + KC_NO, KC_I, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_CALCULATOR, RGB_VAI, + TO(0), KC_G, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS, RGB_VAD, + SHFT_COMMA, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, RGB_HUI, + KC_NO, SHFT_DOT, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, RGB_HUD, + KC_NO, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, RGB_TOG, + + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE + ) + */ + +}; + +void led_set_keymap(uint8_t usb_led) { + +} + +void matrix_init_user (void) { + +} + + +bool left_shift_down = false; +bool right_shift_down = false; + +bool numlock = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + case KC_LSHIFT: + if (record->event.pressed) + { + left_shift_down = true; + return true; + } + else + { + left_shift_down = false; + return true; + } + break; + case KC_RSHIFT: + + if (record->event.pressed) + { + right_shift_down = true; + return true; + } + else + { + right_shift_down = false; + return true; + } + break; + case KC_NUMLOCK: + + if (record->event.pressed) + { + numlock = !numlock; + } + break; + + case DVP_ESC: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + SEND_STRING("~"); + return false; + } + else + { + if(record->event.pressed) + SEND_STRING(SS_DOWN(X_ESCAPE)); + else + SEND_STRING(SS_UP(X_ESCAPE)); + return false; + } + break; + + case DVP_AMPR: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + SEND_STRING("%"); + + } + } + else + { + if(record->event.pressed) + SEND_STRING("&"); + } + return false; + + break; + + case SHFT_DOT: + if(record->event.pressed) + SEND_STRING(">"); + break; + + case SHFT_COMMA: + if(record->event.pressed) + SEND_STRING("<"); + break; + + case DVP_LBRACKET: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_7); + unregister_code(KC_7); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("["); + } + return false; + + return false; + break; + + case DVP_LCBR: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_5); + unregister_code(KC_5); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("{"); + } + return false; + break; + + case DVP_RCBR: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_3); + unregister_code(KC_3); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("}"); + } + return false; + break; + + case DVP_LPRN: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_1); + unregister_code(KC_1); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("("); + } + return false; + break; + + case DVP_AT: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_LSHIFT); + register_code(KC_6); + unregister_code(KC_6); + unregister_code(KC_LSHIFT); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("@"); + } + return false; + break; + + + case DVP_EQUAL: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_9); + unregister_code(KC_9); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("="); + } + return false; + break; + + case DVP_ASTERISK: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_0); + unregister_code(KC_0); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("*"); + } + return false; + break; + + case DVP_RPRN: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_2); + unregister_code(KC_2); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING(")"); + } + return false; + break; + + case DVP_PLUS: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_4); + unregister_code(KC_4); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("+"); + } + return false; + break; + + case DVP_RBRACKET: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_6); + unregister_code(KC_6); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("]"); + } + return false; + break; + + case DVP_EXLM: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_8); + unregister_code(KC_8); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("!"); + } + return false; + break; + + case DVP_HASH: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; + + // Russian + case RU_2: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_3: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_4: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_6: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; +case RU_7: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; + + case RU_DOT: + if (left_shift_down || right_shift_down) + { + if(record->event.pressed) + { + if(left_shift_down) + unregister_code(KC_LSHIFT); + if(right_shift_down) + unregister_code(KC_RSHIFT); + + register_code(KC_GRAVE); + unregister_code(KC_GRAVE); + + if(left_shift_down) + register_code(KC_LSHIFT); + if(right_shift_down) + register_code(KC_RSHIFT); + } + } + else + { + if(record->event.pressed) + SEND_STRING("#"); + } + return false; + break; + + + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + + case RGB_FF0000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0x00); + #endif + } + return false; + break; + + case RGB_008000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x80,0x00); + #endif + } + return false; + break; + + case RGB_0000FF: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x00,0xff); + #endif + } + return false; + break; + + case RGB_FFFFFF: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0xff,0xff); + #endif + } + return false; + break; + + case RGB_800080: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x80,0x00,0x80); + #endif + } + return false; + break; + + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state) { + + uint8_t layer = biton32(state); + + // ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 0: + break; + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + return state; + +}; diff --git a/keyboards/ergodox_ez/keymaps/lukaus/readme.md b/keyboards/ergodox_ez/keymaps/lukaus/readme.md new file mode 100644 index 0000000000..af091bb1b9 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/readme.md @@ -0,0 +1,3 @@ +# Lukaus' keymap + +Programmer's Dvorak as default layer with Qwerty gaming layer and two function layers diff --git a/keyboards/ergodox_ez/keymaps/lukaus/rules.mk b/keyboards/ergodox_ez/keymaps/lukaus/rules.mk new file mode 100644 index 0000000000..fe05f599b9 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/lukaus/rules.mk @@ -0,0 +1 @@ +#UNICODE_ENABLE = yes diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h new file mode 100644 index 0000000000..1c8e0587dc --- /dev/null +++ b/keyboards/handwired/ibm122m/config.h @@ -0,0 +1,190 @@ +/* +Copyright 2018 REPLACE_WITH_YOUR_NAME + +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER IBM +#define PRODUCT IBM Model M 122 key +#define DESCRIPTION Mapping by github.com/lukexorz + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 20 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_COL_PINS { E6, B7, D0, D1, D2, D3, D4, D5, D6, D7, E0, E1, C0, C1, C2, C3, C4, C5, C7, F1 } +#define MATRIX_ROW_PINS { F0, B5, B4, B3, B2, B1, B0, E7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 15 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* |