Commit | Line | Data |
---|---|---|
78fd5a71 | 1 | TMK Keyboard Firmware Collection |
2 | ================================ | |
3 | This is a keyboard firmware with some useful features for Atmel AVR controller. | |
afb08462 | 4 | |
5 | Source code is available here: <http://github.com/tmk/tmk_keyboard> | |
6 | ||
7 | ||
799993c4 JW |
8 | Updates |
9 | ------- | |
5b8e4ca2 | 10 | #### 2016/02/10 |
11 | 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. | |
12 | ||
799993c4 JW |
13 | #### 2015/04/22 |
14 | Core library was separated to other branch `core`. <https://github.com/tmk/tmk_keyboard/tree/core> | |
15 | ||
16 | In `Makefile` you need to set `TMK_DIR` to indicate core library location now. | |
17 | ||
18 | TMK_DIR = ../../tmk_core | |
19 | ||
20 | ||
21 | ||
afb08462 | 22 | Features |
23 | -------- | |
78fd5a71 | 24 | These features can be used in your keyboard. |
25 | ||
633d9aa5 | 26 | * Multi-layer Keymap - Multiple keyboard layouts with layer switching |
74ecdd15 | 27 | * Mouse key - Mouse control with keyboard |
28 | * System Control Key - Power Down, Sleep, Wake Up and USB Remote Wake up | |
29 | * Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc | |
30 | * USB NKRO - 120 keys(+ 8 modifiers) simultaneously | |
31 | * PS/2 mouse support - PS/2 mouse(TrackPoint) as composite device | |
32 | * Keyboard protocols - PS/2, ADB, M0110, Sun and other old keyboard protocols | |
33 | * User Function - Customizable function of key with writing code | |
34 | * Macro - Very primitive at this time | |
35 | * Keyboard Tricks - Oneshot modifier and modifier with tapping feature | |
36 | * Debug Console - Messages for debug and interaction with firmware | |
8b9bd51d | 37 | * Virtual DIP Switch - Configurations stored EEPROM(Boot Magic) |
c0137b4b | 38 | * Locking CapsLock - Mechanical switch support for CapsLock |
0142e20b | 39 | * Breathing Sleep LED - Sleep indicator with charm during USB suspend |
1eb8523e | 40 | * Backlight - Control backlight levels |
afb08462 | 41 | |
42 | ||
799993c4 | 43 | |
afb08462 | 44 | Projects |
45 | -------- | |
083c7581 | 46 | You can find some keyboard specific projects under `converter` and `keyboard` directory. |
47 | ||
afb08462 | 48 | ### converter |
1aa067e5 | 49 | * [ps2_usb](converter/ps2_usb/) - [PS/2 keyboard to USB][GH_ps2] |
50 | * [adb_usb](converter/adb_usb/) - [ADB keyboard to USB][GH_adb] | |
22bd315b | 51 | * [m0110_usb](converter/m0110_usb) - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110] |
1aa067e5 | 52 | * [terminal_usb](converter/terminal_usb/) - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal] |
53 | * [news_usb](converter/news_usb/) - [Sony NEWS keyboard to USB][GH_news] | |
54 | * [x68k_usb](converter/x68k_usb/) - [Sharp X68000 keyboard to USB][GH_x68k] | |
633d9aa5 | 55 | * [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?) |
56 | * [pc98_usb](converter/pc98_usb/) - [PC98] to USB | |
1aa067e5 | 57 | * [usb_usb](converter/usb_usb/) - USB to USB(experimental) |
92cda14f | 58 | * [ascii_usb](converter/ascii_usb/) - ASCII(Serial console terminal) to USB |
428b2364 | 59 | * [ibm4704_usb](converter/ibm4704_usb) - [IBM 4704 keyboard Converter][GH_ibm4704] |
afb08462 | 60 | |
61 | ### keyboard | |
78fd5a71 | 62 | * [hhkb](keyboard/hhkb/) - [Happy Hacking Keyboard pro][GH_hhkb] **my main board** |
63 | * [gh60](keyboard/gh60/) - [GH60] DIY 60% keyboard [prototype][GH60_proto] **my second board** | |
64 | * [hbkb](keyboard/hbkb/) - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod) | |
65 | * [hid_liber](keyboard/hid_liber/) - [HID liberation][HID_liber] controller (by alaricljs) | |
66 | * [phantom](keyboard/phantom/) - [Phantom] keyboard (by Tranquilite) | |
5808317b | 67 | * [IIgs_Standard](keyboard/IIgs/) - Apple [IIGS] keyboard mod(by JeffreySung) |
78fd5a71 | 68 | * [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired] |
43e5ca60 | 69 | * [KMAC](keyboard/kmac/) - Korean custom keyboard |
498ea75d | 70 | * [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard |
d0fefb76 | 71 | * [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity] |
d9b5f511 | 72 | * [NerD](keyboard/nerd/) - Korean custom keyboard |
e0f32742 | 73 | * [KittenPaw](keyboard/kitten_paw) - Custom Majestouch controller |
07b54cb5 | 74 | * [Lightpad](keyboard/lightpad) - Korean custom keypad |
a6d33e2c | 75 | * [ghost_squid](keyboard/ghost_squid/) - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt] |
784c6e39 | 76 | |
0a0463aa | 77 | ### External projects using tmk_keyboard |
771347c4 | 78 | * [ErgoDox_cub-uanic][cub-uanic] - Split Ergonomic Keyboard [ErgoDox][ergodox_org] |
79 | * [mcdox][mcdox_tmk] - [mcdox][mcdox] | |
80 | ||
81 | ||
afb08462 | 82 | [GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930 |
83 | [GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047 | |
84 | [GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618 | |
85 | [GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290 | |
86 | [GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851 | |
87 | [GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965 | |
81706d11 | 88 | [GH_news]: http://geekhack.org/showwiki.php?title=Island:25759 |
afb08462 | 89 | [GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272 |
90 | [GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060 | |
81706d11 | 91 | [GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483 |
428b2364 | 92 | [GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0 |
74ecdd15 | 93 | [HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions |
78fd5a71 | 94 | [Phantom]: http://geekhack.org/index.php?topic=26742 |
74ecdd15 | 95 | [GH60]: http://geekhack.org/index.php?topic=34959 |
78fd5a71 | 96 | [GH60_proto]: http://geekhack.org/index.php?topic=37570.0 |
633d9aa5 | 97 | [PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801 |
98 | [Sun]: http://en.wikipedia.org/wiki/Sun-3 | |
99 | [IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS | |
d0fefb76 | 100 | [Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit |
a6d33e2c VO |
101 | [ghost_squid]: http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid |
102 | [cmxt]: http://gaming.coolermaster.com/en/products/keyboards/quickfirext/ | |
771347c4 | 103 | [ergodox_org]: http://ergodox.org/ |
104 | [cub-uanic]: https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox | |
105 | [mcdox]: https://github.com/DavidMcEwan/mcdox | |
106 | [mcdox_tmk]: https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox | |
afb08462 | 107 | |
108 | ||
109 | ||
78fd5a71 | 110 | License |
111 | ------- | |
112 | **GPLv2** or later. Some protocol files are under **Modified BSD License**. | |
1d5bac21 JW |
113 | |
114 | Third party libraries like LUFA, PJRC and V-USB have their own license respectively. | |
74ecdd15 | 115 | |
afb08462 | 116 | |
784c6e39 | 117 | |
78fd5a71 | 118 | Build Firmware and Program Controller |
119 | ------------------------------------- | |
24c30681 | 120 | See [tmk_core/doc/build.md](tmk_core/doc/build.md). |
afb08462 | 121 | |
afb08462 | 122 | |
123 | ||
083c7581 | 124 | Change your keymap |
125 | ------------------ | |
24c30681 | 126 | See [tmk_core/doc/keymap.md](tmk_core/doc/keymap.md). |
afb08462 | 127 | |
128 | ||
74ecdd15 | 129 | |
22bd315b | 130 | Magic Commands |
74ecdd15 | 131 | -------------- |
132 | To see help press `Magic` + `H`. | |
133 | ||
1d5bac21 JW |
134 | `Magic` key combination is `LShift` + `RShift` in many project, but `Power` key on ADB converter. |
135 | `Magic` keybind can be vary on each project, check `config.h` in project directory. | |
74ecdd15 | 136 | |
137 | Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed. | |
138 | ||
139 | ----- Command Help ----- | |
140 | c: enter console mode | |
141 | d: toggle debug enable | |
142 | x: toggle matrix debug | |
143 | k: toggle keyboard debug | |
144 | m: toggle mouse debug | |
74ecdd15 | 145 | v: print device version & info |
146 | t: print timer count | |
147 | s: print status | |
4e93b3fa | 148 | e: print eeprom config |
149 | n: toggle NKRO | |
74ecdd15 | 150 | 0/F10: switch to Layer0 |
151 | 1/F1: switch to Layer1 | |
152 | 2/F2: switch to Layer2 | |
153 | 3/F3: switch to Layer3 | |
154 | 4/F4: switch to Layer4 | |
155 | PScr: power down/remote wake-up | |
156 | Caps: Lock Keyboard(Child Proof) | |
157 | Paus: jump to bootloader | |
158 | ||
39d09333 | 159 | |
799993c4 JW |
160 | |
161 | Boot Magic Configuration - Virtual DIP Switch | |
162 | --------------------------------------------- | |
22bd315b | 163 | Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable. |
4e93b3fa | 164 | 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 | 165 | |
799993c4 | 166 | 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 | 167 | |
dad9dab9 | 168 | #### General |
169 | - Skip reading EEPROM to start with default configuration(`ESC`) | |
170 | - Clear configuration stored in EEPROM to reset configuration(`Backspace`) | |
4e93b3fa | 171 | |
172 | #### Bootloader | |
8b9bd51d | 173 | - Kick up Bootloader(`B`) |
4e93b3fa | 174 | |
175 | #### Debug | |
8b9bd51d | 176 | - Debug enable(`D`) |
4e93b3fa | 177 | - Debug matrix enable(`D`+`X`) |
178 | - Debug keyboard enable(`D`+`K`) | |
179 | - Debug mouse enable(`D`+`M`) | |
180 | ||
181 | #### Keymap | |
8b9bd51d | 182 | - Swap Control and CapsLock(`Left Control`) |
22bd315b | 183 | - Change CapsLock to Control(`Caps Lock`) |
8b9bd51d | 184 | - Swap LeftAlt and Gui(`Left Alt`) |
185 | - Swap RightAlt and Gui(`Right Alt`) | |
186 | - Disable Gui(`Left Gui`) | |
187 | - Swap Grave and Escape(`Grave`) | |
188 | - Swap BackSlash and BackSpace(`Back Slash`) | |
e5bafff7 | 189 | - Enable NKRO on boot(`N`) |
39d09333 | 190 | |
4e93b3fa | 191 | #### Default Layer |
192 | - Set Default Layer to 0(`0`) | |
dad9dab9 | 193 | - Set Default Layer to 1(`1`) |
194 | - Set Default Layer to 2(`2`) | |
195 | - Set Default Layer to 3(`3`) | |
9de9d719 | 196 | - Set Default Layer to 4(`4`) |
197 | - Set Default Layer to 5(`5`) | |
198 | - Set Default Layer to 6(`6`) | |
199 | - Set Default Layer to 7(`7`) | |
200 | ||
39d09333 | 201 | |
74ecdd15 | 202 | |
27210220 | 203 | Mechanical Locking support |
204 | -------------------------- | |
1d5bac21 JW |
205 | This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock` |
206 | or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN | |
207 | UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res | |
208 | ync option tries to keep switch state consistent with keyboard LED state. | |
c0137b4b | 209 | |
27210220 | 210 | #define LOCKING_SUPPORT_ENABLE |
211 | #define LOCKING_RESYNC_ENABLE | |
c0137b4b | 212 | |
74ecdd15 | 213 | |
799993c4 | 214 | |
74ecdd15 | 215 | Start Your Own Project |
afb08462 | 216 | ----------------------- |
0142e20b | 217 | **TBD** |
78fd5a71 | 218 | |
219 | ||
220 | ||
22bd315b | 221 | Debugging |
78fd5a71 | 222 | -------- |
223 | Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack. | |
afb08462 | 224 | |
799993c4 | 225 | You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`. |
78fd5a71 | 226 | |
227 | ||
228 | ||
229 | Files and Directories | |
74ecdd15 | 230 | ------------------- |
231 | ### Top | |
74ecdd15 | 232 | * keyboard/ - keyboard projects |
233 | * converter/ - protocol converter projects | |
24c30681 | 234 | * tmk_core/ - core library |
235 | * tmk_core/doc/ - documents | |
afb08462 | 236 | |
afb08462 | 237 | |
afb08462 | 238 | |
22bd315b | 239 | Coding Style |
de7b46cd | 240 | ------------- |
241 | - Doesn't use Tab to indent, use 4-spaces instead. | |
242 | ||
243 | ||
244 | ||
78fd5a71 | 245 | Other Keyboard Firmware Projects |
246 | ------------------ | |
d4982a21 | 247 | 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. |