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