]>
Commit | Line | Data |
---|---|---|
1 | TMK Keyboard Firmware Collection | |
2 | ================================ | |
3 | This is a keyboard firmware with some useful features for Atmel AVR controller. | |
4 | ||
5 | Source code is available here: <http://github.com/tmk/tmk_keyboard> | |
6 | ||
7 | ||
8 | Updates | |
9 | ------- | |
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 | ||
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 | ||
22 | Features | |
23 | -------- | |
24 | These features can be used in your keyboard. | |
25 | ||
26 | * Multi-layer Keymap - Multiple keyboard layouts with layer switching | |
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 | |
37 | * Virtual DIP Switch - Configurations stored EEPROM(Boot Magic) | |
38 | * Locking CapsLock - Mechanical switch support for CapsLock | |
39 | * Breathing Sleep LED - Sleep indicator with charm during USB suspend | |
40 | * Backlight - Control backlight levels | |
41 | ||
42 | ||
43 | ||
44 | Projects | |
45 | -------- | |
46 | You can find some keyboard specific projects under `converter` and `keyboard` directory. | |
47 | ||
48 | ### converter | |
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] | |
51 | * [m0110_usb](converter/m0110_usb) - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110] | |
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] | |
55 | * [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?) | |
56 | * [pc98_usb](converter/pc98_usb/) - [PC98] to USB | |
57 | * [usb_usb](converter/usb_usb/) - USB to USB(experimental) | |
58 | * [ascii_usb](converter/ascii_usb/) - ASCII(Serial console terminal) to USB | |
59 | * [ibm4704_usb](converter/ibm4704_usb) - [IBM 4704 keyboard Converter][GH_ibm4704] | |
60 | ||
61 | ### keyboard | |
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) | |
67 | * [IIgs_Standard](keyboard/IIgs/) - Apple [IIGS] keyboard mod(by JeffreySung) | |
68 | * [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired] | |
69 | * [KMAC](keyboard/kmac/) - Korean custom keyboard | |
70 | * [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard | |
71 | * [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity] | |
72 | * [NerD](keyboard/nerd/) - Korean custom keyboard | |
73 | * [KittenPaw](keyboard/kitten_paw) - Custom Majestouch controller | |
74 | * [Lightpad](keyboard/lightpad) - Korean custom keypad | |
75 | * [ghost_squid](keyboard/ghost_squid/) - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt] | |
76 | ||
77 | ### External projects using tmk_keyboard | |
78 | * [ErgoDox_cub-uanic][cub-uanic] - Split Ergonomic Keyboard [ErgoDox][ergodox_org] | |
79 | * [mcdox][mcdox_tmk] - [mcdox][mcdox] | |
80 | ||
81 | ||
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 | |
88 | [GH_news]: http://geekhack.org/showwiki.php?title=Island:25759 | |
89 | [GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272 | |
90 | [GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060 | |
91 | [GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483 | |
92 | [GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0 | |
93 | [HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions | |
94 | [Phantom]: http://geekhack.org/index.php?topic=26742 | |
95 | [GH60]: http://geekhack.org/index.php?topic=34959 | |
96 | [GH60_proto]: http://geekhack.org/index.php?topic=37570.0 | |
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 | |
100 | [Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit | |
101 | [ghost_squid]: http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid | |
102 | [cmxt]: http://gaming.coolermaster.com/en/products/keyboards/quickfirext/ | |
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 | |
107 | ||
108 | ||
109 | ||
110 | License | |
111 | ------- | |
112 | **GPLv2** or later. Some protocol files are under **Modified BSD License**. | |
113 | ||
114 | Third party libraries like LUFA, PJRC and V-USB have their own license respectively. | |
115 | ||
116 | ||
117 | ||
118 | Build Firmware and Program Controller | |
119 | ------------------------------------- | |
120 | See [tmk_core/doc/build.md](tmk_core/doc/build.md). | |
121 | ||
122 | ||
123 | ||
124 | Change your keymap | |
125 | ------------------ | |
126 | See [tmk_core/doc/keymap.md](tmk_core/doc/keymap.md). | |
127 | ||
128 | ||
129 | ||
130 | Magic Commands | |
131 | -------------- | |
132 | To see help press `Magic` + `H`. | |
133 | ||
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. | |
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 | |
145 | v: print device version & info | |
146 | t: print timer count | |
147 | s: print status | |
148 | e: print eeprom config | |
149 | n: toggle NKRO | |
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 | ||
159 | ||
160 | ||
161 | Boot Magic Configuration - Virtual DIP Switch | |
162 | --------------------------------------------- | |
163 | Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable. | |
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. | |
165 | ||
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). | |
167 | ||
168 | #### General | |
169 | - Skip reading EEPROM to start with default configuration(`ESC`) | |
170 | - Clear configuration stored in EEPROM to reset configuration(`Backspace`) | |
171 | ||
172 | #### Bootloader | |
173 | - Kick up Bootloader(`B`) | |
174 | ||
175 | #### Debug | |
176 | - Debug enable(`D`) | |
177 | - Debug matrix enable(`D`+`X`) | |
178 | - Debug keyboard enable(`D`+`K`) | |
179 | - Debug mouse enable(`D`+`M`) | |
180 | ||
181 | #### Keymap | |
182 | - Swap Control and CapsLock(`Left Control`) | |
183 | - Change CapsLock to Control(`Caps Lock`) | |
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`) | |
189 | - Enable NKRO on boot(`N`) | |
190 | ||
191 | #### Default Layer | |
192 | - Set Default Layer to 0(`0`) | |
193 | - Set Default Layer to 1(`1`) | |
194 | - Set Default Layer to 2(`2`) | |
195 | - Set Default Layer to 3(`3`) | |
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 | ||
201 | ||
202 | ||
203 | Mechanical Locking support | |
204 | -------------------------- | |
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. | |
209 | ||
210 | #define LOCKING_SUPPORT_ENABLE | |
211 | #define LOCKING_RESYNC_ENABLE | |
212 | ||
213 | ||
214 | ||
215 | Start Your Own Project | |
216 | ----------------------- | |
217 | **TBD** | |
218 | ||
219 | ||
220 | ||
221 | Debugging | |
222 | -------- | |
223 | Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack. | |
224 | ||
225 | You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`. | |
226 | ||
227 | ||
228 | ||
229 | Files and Directories | |
230 | ------------------- | |
231 | ### Top | |
232 | * keyboard/ - keyboard projects | |
233 | * converter/ - protocol converter projects | |
234 | * tmk_core/ - core library | |
235 | * tmk_core/doc/ - documents | |
236 | ||
237 | ||
238 | ||
239 | Coding Style | |
240 | ------------- | |
241 | - Doesn't use Tab to indent, use 4-spaces instead. | |
242 | ||
243 | ||
244 | ||
245 | Other Keyboard Firmware Projects | |
246 | ------------------ | |
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. |