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