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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

keymap_default.c 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. Copyright 2012 Jun Wako <[email protected]>
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #include "keymap_common.h"
  15. #include "keymap_in_eeprom.h"
  16. #ifdef KEYMAP_SECTION_ENABLE
  17. const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
  18. #else
  19. const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
  20. #endif
  21. #if 0
  22. /* 0: plain Qwerty without layer switching
  23. * ,---------------. ,---------------. ,---------------.
  24. * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24|
  25. * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------.
  26. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help |
  27. * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------'
  28. * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------.
  29. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn|
  30. * |-----------------------------------------------------------| |-----------| |---------------| |-------|
  31. * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und|
  32. * |-----------------------------------------------------------| `-----------' |---------------| |-------|
  33. * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy|
  34. * |-----------------------------------------------------------| ,---. |---------------| |-------|
  35. * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst|
  36. * |-----------------------------------------------------------| ,-----------. |---------------| |-------|
  37. * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut|
  38. * `-----------------------------------------------------------' `-----------' `---------------' `-------'
  39. */
  40. KEYMAP_ALL(
  41. F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
  42. ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP,
  43. GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN,
  44. TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO,
  45. CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY,
  46. LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE,
  47. LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT
  48. ),
  49. #endif
  50. #if 0
  51. /* Colemak http://colemak.com
  52. * ,-----------------------------------------------------------.
  53. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa|
  54. * |-----------------------------------------------------------|
  55. * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \|
  56. * |-----------------------------------------------------------|
  57. * |BackSp| A| R| S| T| D| H| N| E| I| O| '|Return |
  58. * |-----------------------------------------------------------|
  59. * |Shift | Z| X| C| V| B| K| M| ,| ,| /|Shift |
  60. * |-----------------------------------------------------------|
  61. * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
  62. * `----------------------------------------------------------'
  63. */
  64. KEYMAP_ALL(
  65. F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
  66. ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP,
  67. GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN,
  68. TAB, Q, W, F, P, G, J, L, U, Y, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO,
  69. BSPC,A, R, S, T, D, H, N, E, I, O, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY,
  70. LSFT,NUBS,Z, X, C, V, B, K, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE,
  71. LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT
  72. ),
  73. /* Dvorak http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard
  74. * ,-----------------------------------------------------------.
  75. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa|
  76. * |-----------------------------------------------------------|
  77. * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \|
  78. * |-----------------------------------------------------------|
  79. * |BackSp| A| O| E| U| I| D| H| T| N| S| -|Return |
  80. * |-----------------------------------------------------------|
  81. * |Shift | ;| Q| J| K| X| B| M| Wl V| Z|Shift |
  82. * |-----------------------------------------------------------|
  83. * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
  84. * `-----------------------------------------------------------'
  85. */
  86. KEYMAP_ALL(
  87. F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
  88. ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP,
  89. GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN,
  90. TAB, QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH,EQL, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO,
  91. CAPS,A, O, E, U, I, D, H, T, N, S, MINS, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY,
  92. LSFT,NUBS,SCLN,Q, J, K, X, B, M, W, V, Z, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE,
  93. LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT
  94. ),
  95. /* Workman http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/
  96. * ,-----------------------------------------------------------.
  97. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa|
  98. * |-----------------------------------------------------------|
  99. * |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]| \|
  100. * |-----------------------------------------------------------|
  101. * |CapsLo| A| S| H| T| G| Y| N| E| O| I| '|Return |
  102. * |-----------------------------------------------------------|
  103. * |Shift | Z| X| M| C| V| K| L| ,| ,| /|Shift |
  104. * |-----------------------------------------------------------|
  105. * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
  106. * `-----------------------------------------------------------'
  107. */
  108. KEYMAP_ALL(
  109. F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
  110. ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP,
  111. GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN,
  112. TAB, Q, D, R, W, B, J, F, U, P, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO,
  113. CAPS,A, S, H, T, G, Y, N, E, O, I, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY,
  114. LSFT,NUBS,Z, X, M, C, V, K, L, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE,
  115. LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT
  116. ),
  117. #endif
  118. };
  119. #ifdef KEYMAP_SECTION_ENABLE
  120. const uint16_t fn_actions[FN_ACTIONS_COUNT] __attribute__ ((section (".keymap.fn_actions"))) = {
  121. #else
  122. const uint16_t fn_actions[] PROGMEM = {
  123. #endif
  124. };
  125. #ifdef KEYMAP_IN_EEPROM_ENABLE
  126. uint16_t keys_count(void) {
  127. return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS;
  128. }
  129. uint16_t fn_actions_count(void) {
  130. return sizeof(fn_actions) / sizeof(fn_actions[0]);
  131. }
  132. #endif