Commit | Line | Data |
---|---|---|
78fd5a71 | 1 | TMK Keyboard Firmware Collection |
2 | ================================ | |
885e7adb | 3 | This repository includes keyboard and converter firmware projects built with [`tmk_core`][tmk_core] keyboard library. |
afb08462 | 4 | |
885e7adb | 5 | The latest source code is available here: <http://github.com/tmk/tmk_keyboard> |
afb08462 | 6 | |
7 | ||
799993c4 JW |
8 | Updates |
9 | ------- | |
1b5266cb | 10 | #### 2016/06/26 |
11 | Keymap framework was updated. `fn_actions[]` should be defined as `action_t` instead of `uint16_t`. And default code for keymap handling is now included in core you just need define `uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]` and `action_t fn_actions[]`. | |
12 | ||
13 | ||
885e7adb | 14 | #### 2016/06/22 |
15 | Some projects were moved from `converter` and `keyboard` to `orphan` directory. Those might be removed in some future but you will be able to access them with `orphans` tag. See <https://github.com/tmk/tmk_keyboard/issues/173> | |
16 | ||
5b8e4ca2 | 17 | #### 2016/02/10 |
18 | core: flabbergast's Chibios protocol was merged from <https://github.com/flabbergast/tmk_keyboard/tree/chibios> (@72b1668). See [tmk_core/protocol/chibios/README.md](tmk_core/protocol/chibios/README.md). Chibios protocol supports Cortex-M such as STM32 and Kinetis. | |
19 | ||
799993c4 JW |
20 | #### 2015/04/22 |
21 | Core library was separated to other branch `core`. <https://github.com/tmk/tmk_keyboard/tree/core> | |
22 | ||
23 | In `Makefile` you need to set `TMK_DIR` to indicate core library location now. | |
24 | ||
25 | TMK_DIR = ../../tmk_core | |
26 | ||
27 | ||
28 | ||
afb08462 | 29 | Projects |
30 | -------- | |
083c7581 | 31 | You can find some keyboard specific projects under `converter` and `keyboard` directory. |
32 | ||
afb08462 | 33 | ### converter |
1aa067e5 | 34 | * [ps2_usb](converter/ps2_usb/) - [PS/2 keyboard to USB][GH_ps2] |
35 | * [adb_usb](converter/adb_usb/) - [ADB keyboard to USB][GH_adb] | |
22bd315b | 36 | * [m0110_usb](converter/m0110_usb) - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110] |
1aa067e5 | 37 | * [terminal_usb](converter/terminal_usb/) - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal] |
38 | * [news_usb](converter/news_usb/) - [Sony NEWS keyboard to USB][GH_news] | |
39 | * [x68k_usb](converter/x68k_usb/) - [Sharp X68000 keyboard to USB][GH_x68k] | |
633d9aa5 | 40 | * [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?) |
41 | * [pc98_usb](converter/pc98_usb/) - [PC98] to USB | |
885e7adb | 42 | * [usb_usb](converter/usb_usb/) - [USB to USB][GH_usb] |
43 | * [ibm4704_usb](converter/ibm4704_usb) - [IBM 4704 keyboard to USB][GH_ibm4704] | |
44 | * [next_usb](converter/next_usb) - NeXT(Non-ADB) to USB, contributed by [BCG](https://github.com/bgould) and based on [Adafruit's work](https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview) | |
afb08462 | 45 | |
46 | ### keyboard | |
78fd5a71 | 47 | * [hhkb](keyboard/hhkb/) - [Happy Hacking Keyboard pro][GH_hhkb] **my main board** |
885e7adb | 48 | * [alps64](keyboard/alps64/) - [Alps64 PCB](https://geekhack.org/index.php?topic=69740.0) |
78fd5a71 | 49 | * [hbkb](keyboard/hbkb/) - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod) |
d0fefb76 | 50 | * [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity] |
885e7adb | 51 | * [gh60](keyboard/gh60/) - [GH60] DIY 60% keyboard [prototype][GH60_proto] **my second board** |
52 | * [onekey](keyboard/onekey/) - Simple one key keyboard example | |
784c6e39 | 53 | |
885e7adb | 54 | |
55 | ### Projects based tmk_keyboard or tmk_core | |
56 | https://github.com/tmk/tmk_keyboard/wiki/TMK-Based-Projects | |
771347c4 | 57 | |
58 | ||
afb08462 | 59 | [GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047 |
60 | [GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618 | |
61 | [GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290 | |
62 | [GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851 | |
63 | [GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965 | |
81706d11 | 64 | [GH_news]: http://geekhack.org/showwiki.php?title=Island:25759 |
afb08462 | 65 | [GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272 |
66 | [GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060 | |
81706d11 | 67 | [GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483 |
428b2364 | 68 | [GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0 |
74ecdd15 | 69 | [GH60]: http://geekhack.org/index.php?topic=34959 |
78fd5a71 | 70 | [GH60_proto]: http://geekhack.org/index.php?topic=37570.0 |
633d9aa5 | 71 | [PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801 |
72 | [Sun]: http://en.wikipedia.org/wiki/Sun-3 | |
d0fefb76 | 73 | [Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit |
38ab2356 | 74 | [tmk_core]: https://github.com/tmk/tmk_core |
afb08462 | 75 | |
76 | ||
77 | ||
78fd5a71 | 78 | License |
79 | ------- | |
80 | **GPLv2** or later. Some protocol files are under **Modified BSD License**. | |
1d5bac21 JW |
81 | |
82 | Third party libraries like LUFA, PJRC and V-USB have their own license respectively. | |
74ecdd15 | 83 | |
afb08462 | 84 | |
784c6e39 | 85 | |
78fd5a71 | 86 | Build Firmware and Program Controller |
87 | ------------------------------------- | |
24c30681 | 88 | See [tmk_core/doc/build.md](tmk_core/doc/build.md). |
afb08462 | 89 | |
afb08462 | 90 | |
91 | ||
083c7581 | 92 | Change your keymap |
93 | ------------------ | |
24c30681 | 94 | See [tmk_core/doc/keymap.md](tmk_core/doc/keymap.md). |
afb08462 | 95 | |
96 | ||
74ecdd15 | 97 | |
22bd315b | 98 | Magic Commands |
74ecdd15 | 99 | -------------- |
100 | To see help press `Magic` + `H`. | |
101 | ||
885e7adb | 102 | `Magic` key combination is `LShift` + `RShift` in many projects, but `Power` key on ADB converter. |
1d5bac21 | 103 | `Magic` keybind can be vary on each project, check `config.h` in project directory. |
74ecdd15 | 104 | |
105 | Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed. | |
106 | ||
107 | ----- Command Help ----- | |
108 | c: enter console mode | |
109 | d: toggle debug enable | |
110 | x: toggle matrix debug | |
111 | k: toggle keyboard debug | |
112 | m: toggle mouse debug | |
74ecdd15 | 113 | v: print device version & info |
114 | t: print timer count | |
115 | s: print status | |
4e93b3fa | 116 | e: print eeprom config |
117 | n: toggle NKRO | |
74ecdd15 | 118 | 0/F10: switch to Layer0 |
119 | 1/F1: switch to Layer1 | |
120 | 2/F2: switch to Layer2 | |
121 | 3/F3: switch to Layer3 | |
122 | 4/F4: switch to Layer4 | |
123 | PScr: power down/remote wake-up | |
124 | Caps: Lock Keyboard(Child Proof) | |
125 | Paus: jump to bootloader | |
126 | ||
39d09333 | 127 | |
799993c4 JW |
128 | |
129 | Boot Magic Configuration - Virtual DIP Switch | |
130 | --------------------------------------------- | |
22bd315b | 131 | Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable. |
4e93b3fa | 132 | Note that you must use keys of **Layer 0** as Magic keys. These settings are stored in EEPROM so that retain your configure over power cycles. |
39d09333 | 133 | |
799993c4 | 134 | To avoid configuring accidentally additive salt key `KC_SPACE` also needs to be pressed along with the following configuration keys. The salt key is configurable in `config.h`. See [tmk_core/common/bootmagic.h](tmk_core/common/bootmagic.h). |
05225dd9 | 135 | |
dad9dab9 | 136 | #### General |
137 | - Skip reading EEPROM to start with default configuration(`ESC`) | |
138 | - Clear configuration stored in EEPROM to reset configuration(`Backspace`) | |
4e93b3fa | 139 | |
140 | #### Bootloader | |
8b9bd51d | 141 | - Kick up Bootloader(`B`) |
4e93b3fa | 142 | |
143 | #### Debug | |
8b9bd51d | 144 | - Debug enable(`D`) |
4e93b3fa | 145 | - Debug matrix enable(`D`+`X`) |
146 | - Debug keyboard enable(`D`+`K`) | |
147 | - Debug mouse enable(`D`+`M`) | |
148 | ||
149 | #### Keymap | |
8b9bd51d | 150 | - Swap Control and CapsLock(`Left Control`) |
22bd315b | 151 | - Change CapsLock to Control(`Caps Lock`) |
8b9bd51d | 152 | - Swap LeftAlt and Gui(`Left Alt`) |
153 | - Swap RightAlt and Gui(`Right Alt`) | |
154 | - Disable Gui(`Left Gui`) | |
155 | - Swap Grave and Escape(`Grave`) | |
156 | - Swap BackSlash and BackSpace(`Back Slash`) | |
e5bafff7 | 157 | - Enable NKRO on boot(`N`) |
39d09333 | 158 | |
4e93b3fa | 159 | #### Default Layer |
160 | - Set Default Layer to 0(`0`) | |
dad9dab9 | 161 | - Set Default Layer to 1(`1`) |
162 | - Set Default Layer to 2(`2`) | |
163 | - Set Default Layer to 3(`3`) | |
9de9d719 | 164 | - Set Default Layer to 4(`4`) |
165 | - Set Default Layer to 5(`5`) | |
166 | - Set Default Layer to 6(`6`) | |
167 | - Set Default Layer to 7(`7`) | |
168 | ||
39d09333 | 169 | |
74ecdd15 | 170 | |
27210220 | 171 | Mechanical Locking support |
172 | -------------------------- | |
885e7adb | 173 | This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock` |
1d5bac21 JW |
174 | or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN |
175 | UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res | |
176 | ync option tries to keep switch state consistent with keyboard LED state. | |
885e7adb | 177 | |
27210220 | 178 | #define LOCKING_SUPPORT_ENABLE |
179 | #define LOCKING_RESYNC_ENABLE | |
c0137b4b | 180 | |
74ecdd15 | 181 | |
799993c4 | 182 | |
74ecdd15 | 183 | Start Your Own Project |
afb08462 | 184 | ----------------------- |
885e7adb | 185 | 1. Add `tmk_core` into your repository using `git submodule` or `git subtree`. |
186 | 2. Copy files from `tmk_keybaord` or other project similar to yours | |
187 | 3. Edit those files to support your keyboard. | |
188 | ||
189 | See these as examples. | |
190 | - https://github.com/tmk/infinity_ergodox | |
191 | - https://github.com/tmk/whitefox | |
78fd5a71 | 192 | |
193 | ||
194 | ||
22bd315b | 195 | Debugging |
78fd5a71 | 196 | -------- |
885e7adb | 197 | Use PJRC's `hid_listen` to see debug messages. You can use xprintf() to display debug info, see `tmk_core/common/xprintf.h`. |
afb08462 | 198 | |
885e7adb | 199 | - https://www.pjrc.com/teensy/hid_listen.html |
78fd5a71 | 200 | |
201 | ||
202 | ||
203 | Files and Directories | |
74ecdd15 | 204 | ------------------- |
205 | ### Top | |
74ecdd15 | 206 | * keyboard/ - keyboard projects |
207 | * converter/ - protocol converter projects | |
24c30681 | 208 | * tmk_core/ - core library |
209 | * tmk_core/doc/ - documents | |
afb08462 | 210 | |
afb08462 | 211 | |
afb08462 | 212 | |
885e7adb | 213 | Contribution |
214 | ------------ | |
215 | - Report bugs in github **[Issues](https://github.com/tmk/tmk_keyboard/issues)**. | |
216 | - Pull requets are also welcomed. | |
217 | ||
218 | ||
219 | ||
22bd315b | 220 | Coding Style |
de7b46cd | 221 | ------------- |
222 | - Doesn't use Tab to indent, use 4-spaces instead. | |
223 | ||
224 | ||
225 | ||
78fd5a71 | 226 | Other Keyboard Firmware Projects |
227 | ------------------ | |
d4982a21 | 228 | You can learn a lot about keyboard firmware from these. See [Other Projects](https://github.com/tmk/tmk_keyboard/wiki/Other-Projects) other than TMK. |