You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

368 lines
18 KiB

Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) * add users/mtei/key_blocks.h This change does not alter the binary of the build result. Moved common macro definitions in the following files to users/mtei/key_blocks.h. * keyboards/helix/rev2/keymaps/five_rows/keymap.c * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c * remove INIT_HELIX_OLED() in helix:five_rows This change does not alter the binary of the build result. * update helix/pico/keymaps/mtei/keymap.c Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h. This change does not alter the binary of the build result. * Remove old SSD1306OLED code from users/mtei/oled_display.c This change does not alter the binary of the build result. * add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c * add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk} * move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/pico/keymaps/mtei/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev2/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/cpp_map.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/debug_config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update users/mtei/layer_number_util.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
  1. /* Copyright 2018 mtei
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include QMK_KEYBOARD_H
  17. #include "key_blocks.h"
  18. #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
  19. #define kc5(a,b,c,d,e) KC_##a, KC_##b, KC_##c, KC_##d, KC_##e
  20. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  21. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
  22. // Layer names don't all need to be of the same length, obviously, and you can also skip them
  23. // entirely and just use numbers.
  24. enum layer_number {
  25. _QWERTY = 0,
  26. _COLEMAK,
  27. _DVORAK,
  28. _EUCALYN,
  29. _NUML,
  30. _NUMR,
  31. _LOWER,
  32. _RAISE,
  33. _ADJUST,
  34. };
  35. enum custom_keycodes {
  36. QWERTY = SAFE_RANGE,
  37. COLEMAK,
  38. DVORAK,
  39. EUCALYN,
  40. NUML,
  41. NUMR,
  42. xEISU,
  43. xKANA,
  44. ZERO2,
  45. RGBRST
  46. };
  47. // clang-format off
  48. //Macros
  49. #define LT_NUML_SP LT(_NUML,KC_SPC)
  50. #define LT_NUMR_SP LT(_NUMR,KC_SPC)
  51. #define LT_RA_BSPC LT(_RAISE,KC_BSPC)
  52. #define LT_RA_ENT LT(_RAISE,KC_ENT)
  53. #define ___ _______
  54. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  55. /* Qwerty */
  56. #define LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS MO(_LOWER), MO(_LOWER), KC_CAPS, KC_LALT, KC_LGUI, LT_NUML_SP, LT_RA_BSPC
  57. #define RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER LT_RA_ENT, LT_NUMR_SP, KC_RGUI, KC_RALT, KC_APP, MO(_LOWER), MO(_LOWER)
  58. /* ,-----------------------------------------. ,-----------------------------------------.
  59. * | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
  60. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  61. * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl |
  62. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  63. * | Shift| Z | X | C | V | B | | N | M | , | . | / | Shift|
  64. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  65. * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
  66. * `-------------------------------------------------------------------------------------------------'
  67. */
  68. [_QWERTY] = LAYOUT_wrapper(
  69. KC_ESC, Q_____W_____E_____R_____T, Y_____U_____I_____O_____P, KC_BSLS,
  70. KC_LCTL, A_____S_____D_____F_____G, H_____J_____K_____L____SCLN, KC_RCTL,
  71. KC_LSFT, Z_____X_____C_____V_____B, N_____M____COMM__DOT___SLSH, KC_RSFT,
  72. LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
  73. ),
  74. /* Colemak */
  75. /* ,-----------------------------------------. ,-----------------------------------------.
  76. * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | \ |
  77. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  78. * | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl |
  79. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  80. * | Shift| Z | X | C | V | B | | K | M | , | . | / | Shift|
  81. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  82. * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
  83. * `-------------------------------------------------------------------------------------------------'
  84. */
  85. [_COLEMAK] = LAYOUT_wrapper(
  86. KC_ESC, Q_____W_____F_____P_____G, J_____L_____U_____Y____SCLN, KC_BSLS,
  87. KC_LCTL, A_____R_____S_____T_____D, H_____N_____E_____I_____O, KC_RCTL,
  88. KC_LSFT, Z_____X_____C_____V_____B, K_____M____COMM__DOT___SLSH, KC_RSFT,
  89. LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
  90. ),
  91. /* Dvorak */
  92. /* ,-----------------------------------------. ,-----------------------------------------.
  93. * | ESC | ' | , | . | P | Y | | F | G | C | R | L | \ |
  94. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  95. * | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl |
  96. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  97. * | Shift| ; | Q | J | K | X | | B | M | W | V | Z | Shift|
  98. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  99. * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
  100. * `-------------------------------------------------------------------------------------------------'
  101. */
  102. [_DVORAK] = LAYOUT_wrapper(
  103. KC_ESC, QUOT_COMM___DOT____P_____Y, F_____G_____C_____R_____L, KC_BSLS,
  104. KC_LCTL, A_____O_____E_____U_____I, D_____H_____T_____N_____S, KC_RCTL,
  105. KC_LSFT, SCLN___Q_____J_____K_____X, B_____M_____W_____V_____Z, KC_RSFT,
  106. LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
  107. ),
  108. /* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) */
  109. /* ,-----------------------------------------. ,-----------------------------------------.
  110. * | ESC | Q | W | , | . | ; | | M | R | D | Y | P | \ |
  111. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  112. * | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl |
  113. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  114. * | Shift| Z | X | C | V | F | | B | H | J | L | / | Shift|
  115. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  116. * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
  117. * `-------------------------------------------------------------------------------------------------'
  118. */
  119. [_EUCALYN] = LAYOUT_wrapper(
  120. KC_ESC, Q_____W___COMM___DOT__SCLN, M_____R_____D_____Y_____P, KC_BSLS,
  121. KC_LCTL, A_____O_____E_____I_____U, G_____T_____K_____S_____N, KC_RCTL,
  122. KC_LSFT, Z_____X_____C_____V_____F, B_____H_____J_____L____SLSH, KC_RSFT,
  123. LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
  124. ),
  125. /* Num */
  126. #define EXLM__AT__HASH___DLR__PERC kc5( EXLM, AT, HASH, DLR, PERC )
  127. #define CIRC_AMPR_ASTR__LPRN__RPRN kc5( CIRC, AMPR, ASTR, LPRN, RPRN )
  128. #define ____z_____z_____z_____z _______, _______, _______, _______
  129. #define ____z_____z_____z _______, _______, _______
  130. #define ____z_____z _______, _______
  131. /* ,-----------------------------------------. ,-----------------------------------------.
  132. * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
  133. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  134. * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
  135. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  136. * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
  137. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  138. * | | | | | | | | | | | | | | |
  139. * `-------------------------------------------------------------------------------------------------'
  140. */
  141. [_NUML] = LAYOUT_wrapper(
  142. _______, EXLM__AT__HASH___DLR__PERC, CIRC_AMPR_ASTR__LPRN__RPRN, _______,
  143. _______, _1_____2_____3_____4_____5, _6_____7_____8_____9_____0, KC_F12,
  144. _______, F1____F2____F3____F4____F5, F6____F7____F8____F9____F10, KC_F11,
  145. _______, ____z_____z_____z_____z,____z_____z_____z,KC_SPC, ____z_____z_____z_____z, _______
  146. ),
  147. [_NUMR] = LAYOUT_wrapper(
  148. _______, EXLM__AT__HASH___DLR__PERC, CIRC_AMPR_ASTR__LPRN__RPRN, _______,
  149. _______, _1_____2_____3_____4_____5, _6_____7_____8_____9_____0, KC_F12,
  150. _______, F1____F2____F3____F4____F5, F6____F7____F8____F9____F10, KC_F11,
  151. _______, ____z_____z_____z_____z,KC_SPC, ____z_____z_____z,____z_____z_____z_____z, _______
  152. ),
  153. /* Lower */
  154. #define XXXX__PAUS__SLCK___INS__XXXX XXXXXXX, KC_PAUS, KC_SLCK, KC_INS, XXXXXXX
  155. #define XXXX___INS__SLCK__PAUS__XXXX XXXXXXX, KC_INS, KC_SLCK, KC_PAUS, XXXXXXX
  156. #define HOME__XXXX____UP___DEL__PGUP KC_HOME, XXXXXXX, KC_UP, KC_DEL, KC_PGUP
  157. #define PGUP___DEL____UP__XXXX__HOME KC_PGUP, KC_DEL, KC_UP, XXXXXXX, KC_HOME
  158. #define END___LEFT__DOWN__RGHT__PGDN kc5( END, LEFT, DOWN, RGHT, PGDN )
  159. #define PGDN__LEFT__DOWN__RGHT___END kc5( PGDN, LEFT, DOWN, RGHT, END )
  160. #define ______PSCR__________________ _______, KC_PSCR, _______, _______, _______
  161. #define __________________PSCR______ _______, _______, _______, KC_PSCR, _______
  162. #define ADJ___ADJ MO(_ADJUST), MO(_ADJUST)
  163. /* ,-----------------------------------------. ,-----------------------------------------.
  164. * | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | |
  165. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  166. * | | Home | | Up |Delete| PgUp | | PgUp |Delete| Up | | Home | |
  167. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  168. * | | End | Left | Down | Right| PgDn | | PgDn | Left | Down | Right| End | |
  169. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  170. * | | | PrtSc| | | |Adjust|Adjust| | | | PrtSc| | |
  171. * `-------------------------------------------------------------------------------------------------'
  172. */
  173. [_LOWER] = LAYOUT_wrapper(
  174. XXXXXXX, XXXX__PAUS__SLCK___INS__XXXX, XXXX___INS__SLCK__PAUS__XXXX, _______,
  175. _______, HOME__XXXX____UP___DEL__PGUP, PGUP___DEL____UP__XXXX__HOME, _______,
  176. _______, END___LEFT__DOWN__RGHT__PGDN, PGDN__LEFT__DOWN__RGHT___END, _______,
  177. _______, ______PSCR__________________, ADJ___ADJ, __________________PSCR______, _______
  178. ),
  179. /* Raise */
  180. #define XXXX__XXXX__XXXX__UNDS__MINS XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_MINS
  181. #define EQL__PLUS__XXXX__XXXX__XXXX KC_EQL, KC_PLUS, XXXXXXX, XXXXXXX, XXXXXXX
  182. #define XXXX__XXXX__XXXX__LCBR__LBRC XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC
  183. #define RBRC__RCBR__XXXX__XXXX__XXXX KC_RBRC, KC_RCBR, XXXXXXX, XXXXXXX, XXXXXXX
  184. #define XXXX__XXXX__XXXX__TILD___GRV XXXXXXX, XXXXXXX, XXXXXXX, KC_TILD, KC_GRV
  185. #define QUOT___DQT__XXXX__XXXX__XXXX KC_QUOT, KC_DQT, XXXXXXX, XXXXXXX, XXXXXXX
  186. #define XXXX______________XXXX XXXXXXX, _______, _______, XXXXXXX
  187. /* ,-----------------------------------------. ,-----------------------------------------.
  188. * | TAB | | | | _ | - | | = | + | | | | |
  189. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  190. * | EISU | | | | { | [ | | ] | } | | | | KANA |
  191. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  192. * | | | | | ~ | ` | | ' | " | | | | |
  193. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  194. * | | | | | | | | | | | | | | |
  195. * `-------------------------------------------------------------------------------------------------'
  196. */
  197. [_RAISE] = LAYOUT_wrapper(
  198. KC_TAB, XXXX__XXXX__XXXX__UNDS__MINS, EQL__PLUS__XXXX__XXXX__XXXX, XXXXXXX,
  199. xEISU, XXXX__XXXX__XXXX__LCBR__LBRC, RBRC__RCBR__XXXX__XXXX__XXXX, xKANA,
  200. XXXXXXX, XXXX__XXXX__XXXX__TILD___GRV, QUOT___DQT__XXXX__XXXX__XXXX, XXXXXXX,
  201. ADJ___ADJ, XXXX______________XXXX, ____z_____z, XXXX______________XXXX, ADJ___ADJ
  202. ),
  203. /* Adjust (Lower + Raise)
  204. * ,-----------------------------------------. ,-----------------------------------------.
  205. * | | Reset|RGBRST|RGB ON|Aud on| Win | | Win | |Qwerty|Euclyn|Colemk|Dvorak|
  206. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  207. * | HUE+ | SAT+ | VAL+ |RGB md|Audoff| Mac | | Mac | | | | | |
  208. * |------+------+------+------+------+------| |------+------+------+------+------+------|
  209. * | HUE- | SAT- | VAL- | | | | | | | | | | |
  210. * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
  211. * | | | | | | | | | | | | | | |
  212. * `-------------------------------------------------------------------------------------------------'
  213. */
  214. [_ADJUST] = LAYOUT( \
  215. XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, XXXXXXX, QWERTY, EUCALYN, COLEMAK, DVORAK, \
  216. RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
  217. RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
  218. _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \
  219. )
  220. };
  221. #ifdef AUDIO_ENABLE
  222. float tone_qwerty[][2] = SONG(QWERTY_SOUND);
  223. float tone_dvorak[][2] = SONG(DVORAK_SOUND);
  224. float tone_colemak[][2] = SONG(COLEMAK_SOUND);
  225. float tone_plover[][2] = SONG(PLOVER_SOUND);
  226. float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
  227. float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
  228. #endif
  229. static int current_default_layer;
  230. uint32_t default_layer_state_set_kb(uint32_t state) {
  231. // 1<<_QWERTY - 1 == 1 - 1 == _QWERTY (=0)
  232. // 1<<_COLEMAK - 1 == 2 - 1 == _COLEMAK (=1)
  233. current_default_layer = state - 1;
  234. // 1<<_DVORAK - 2 == 4 - 2 == _DVORAK (=2)
  235. if ( current_default_layer == 3 ) current_default_layer -= 1;
  236. // 1<<_EUCALYN - 5 == 8 - 5 == _EUCALYN (=3)
  237. if ( current_default_layer == 7 ) current_default_layer -= 4;
  238. return state;
  239. }
  240. void update_base_layer(int base)
  241. {
  242. if( current_default_layer != base ) {
  243. eeconfig_update_default_layer(1UL<<base);
  244. default_layer_set(1UL<<base);
  245. }
  246. }
  247. bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  248. switch (keycode) {
  249. case QWERTY:
  250. if (record->event.pressed) {
  251. #ifdef AUDIO_ENABLE
  252. PLAY_SONG(tone_qwerty);
  253. #endif
  254. update_base_layer(_QWERTY);
  255. }
  256. return false;
  257. break;
  258. case COLEMAK:
  259. if (record->event.pressed) {
  260. #ifdef AUDIO_ENABLE
  261. PLAY_SONG(tone_colemak);
  262. #endif
  263. update_base_layer(_COLEMAK);
  264. }
  265. return false;
  266. break;
  267. case DVORAK:
  268. if (record->event.pressed) {
  269. #ifdef AUDIO_ENABLE
  270. PLAY_SONG(tone_dvorak);
  271. #endif
  272. update_base_layer(_DVORAK);
  273. }
  274. return false;
  275. break;
  276. case EUCALYN:
  277. if (record->event.pressed) {
  278. #ifdef AUDIO_ENABLE
  279. PLAY_SONG(tone_dvorak);
  280. #endif
  281. update_base_layer(_EUCALYN);
  282. }
  283. return false;
  284. break;
  285. case xEISU:
  286. if (record->event.pressed) {
  287. if(keymap_config.swap_lalt_lgui==false){
  288. register_code(KC_LANG2);
  289. }else{
  290. SEND_STRING(SS_LALT("`"));
  291. }
  292. } else {
  293. unregister_code(KC_LANG2);
  294. }
  295. return false;
  296. break;
  297. case xKANA:
  298. if (record->event.pressed) {
  299. if(keymap_config.swap_lalt_lgui==false){
  300. register_code(KC_LANG1);
  301. }else{
  302. SEND_STRING(SS_LALT("`"));
  303. }
  304. } else {
  305. unregister_code(KC_LANG1);
  306. }
  307. return false;
  308. break;
  309. case RGBRST:
  310. #ifdef RGBLIGHT_ENABLE
  311. if (record->event.pressed) {
  312. eeconfig_update_rgblight_default();
  313. rgblight_enable();
  314. }
  315. #endif
  316. break;
  317. }
  318. return true;
  319. }
  320. void matrix_init_user(void) {
  321. #ifdef AUDIO_ENABLE
  322. startup_user();
  323. #endif
  324. }
  325. #ifdef AUDIO_ENABLE
  326. void startup_user()
  327. {
  328. _delay_ms(50); // gets rid of tick
  329. }
  330. void shutdown_user()
  331. {
  332. _delay_ms(150);
  333. stop_all_notes();
  334. }
  335. void music_on_user(void)
  336. {
  337. music_scale_user();
  338. }
  339. void music_scale_user(void)
  340. {
  341. PLAY_SONG(music_scale);
  342. }
  343. #endif