keymap.c 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  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 <stdint.h>
  15. #include <stdbool.h>
  16. #include "keycode.h"
  17. #include "print.h"
  18. #include "debug.h"
  19. #include "util.h"
  20. #include "ibm_terminal.h"
  21. // Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
  22. const uint8_t PROGMEM fn_layer[] = {
  23. 0, // Fn0
  24. 0, // Fn1
  25. 0, // Fn2
  26. 0, // Fn3
  27. 0, // Fn4
  28. 0, // Fn5
  29. 0, // Fn6
  30. 0 // Fn7
  31. };
  32. // Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
  33. // See layer.c for details.
  34. const uint8_t PROGMEM fn_keycode[] = {
  35. KC_NO, // Fn0
  36. KC_NO, // Fn1
  37. KC_NO, // Fn2
  38. KC_NO, // Fn3
  39. KC_NO, // Fn4
  40. KC_NO, // Fn5
  41. KC_NO, // Fn6
  42. KC_NO // Fn7
  43. };
  44. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  45. /* 0: default
  46. * ,---. ,---------------. ,---------------. ,---------------. ,-----------.
  47. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
  48. * `---' `---------------' `---------------' `---------------' `-----------'
  49. * ,-----------------------------------------------------------. ,-----------. ,---------------.
  50. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BS | |Ins|Hom|PgU| |NmL| /| *| -|
  51. * |-----------------------------------------------------------| |-----------| |---------------|
  52. * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| |
  53. * |-----------------------------------------------------------| `-----------' |-----------| +|
  54. * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| #|Retu| | 4| 5| 6| |
  55. * |-----------------------------------------------------------| ,---. |---------------|
  56. * |Shif| \| Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
  57. * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
  58. * |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| |
  59. * `----' `---------------------------------------' `----' `-----------' `---------------'
  60. */
  61. /*
  62. KEYMAP(
  63. F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
  64. F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
  65. PSCR,ESC, GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
  66. SLCK,INT4, TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS,
  67. PAUS,INT5, CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, UP, P4, P5, P6, PCMM,
  68. APP, INT6, LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, LEFT,INT2,RGHT, P1, P2, P3, PENT,
  69. RGUI,LGUI, LCTL, LALT, SPC, RALT, RCTL, DOWN, NO, P0, PDOT,NO
  70. ),
  71. */
  72. // pseudo ANSI
  73. KEYMAP(
  74. F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
  75. F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
  76. PSCR,ESC, ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NO, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
  77. SLCK,INT4, TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, NO, DEL, END, PGDN, P7, P8, P9, PPLS,
  78. PAUS,INT5, LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, BSLS,ENT, UP, P4, P5, P6, PCMM,
  79. APP, INT6, LSFT,LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, NO, RSFT, LEFT,INT2,RGHT, P1, P2, P3, PENT,
  80. RGUI,LGUI, LCTL, LALT, SPC, LGUI, GRV, DOWN, NO, P0, PDOT,NO
  81. ),
  82. /* 101-key keymaps
  83. */
  84. /* 0: default
  85. * ,---. ,---------------. ,---------------. ,---------------. ,-----------.
  86. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
  87. * `---' `---------------' `---------------' `---------------' `-----------'
  88. * ,-----------------------------------------------------------. ,-----------. ,---------------.
  89. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -|
  90. * |-----------------------------------------------------------| |-----------| |---------------|
  91. * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| |
  92. * |-----------------------------------------------------------| `-----------' |-----------| +|
  93. * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| |
  94. * |-----------------------------------------------------------| ,---. |---------------|
  95. * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
  96. * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
  97. * |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| |
  98. * `----' `---------------------------------------' `----' `-----------' `---------------'
  99. */
  100. /*
  101. KEYMAP_101(
  102. ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK, BRK,
  103. GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,MINS, EQL,BSPC, INS,HOME,PGUP, NLCK,PSLS,PAST,PMNS,
  104. TAB, Q, W, E, R, T, Y, U, I, O, P,LBRC,RBRC,BSLS, DEL, END,PGDN, P7, P8, P9,
  105. CAPS, A, S, D, F, G, H, J, K, L,SCLN,QUOT, ENT, P4, P5, P6,PPLS,
  106. LSFT, Z, X, C, V, B, N, M,COMM, DOT,SLSH, RSFT, UP, P1, P2, P3,
  107. LCTL, LALT, SPC, RALT, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
  108. ),
  109. */
  110. };