]> git.gir.st - tmk_keyboard.git/blame_incremental - README.md
Add default layer config to bootmagic
[tmk_keyboard.git] / README.md
... / ...
CommitLineData
1TMK Keyboard Firmware Collection
2================================
3This is a keyboard firmware with some useful features for Atmel AVR controller.
4
5Source code is available here: <http://github.com/tmk/tmk_keyboard>
6
7
8Features
9--------
10These features can be used in your keyboard.
11
12* Multi-layer Keymap - Multiple keyboard layouts with layer switching
13* Mouse key - Mouse control with keyboard
14* System Control Key - Power Down, Sleep, Wake Up and USB Remote Wake up
15* Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
16* USB NKRO - 120 keys(+ 8 modifiers) simultaneously
17* PS/2 mouse support - PS/2 mouse(TrackPoint) as composite device
18* Keyboard protocols - PS/2, ADB, M0110, Sun and other old keyboard protocols
19* User Function - Customizable function of key with writing code
20* Macro - Very primitive at this time
21* Keyboard Tricks - Oneshot modifier and modifier with tapping feature
22* Debug Console - Messages for debug and interaction with firmware
23* Virtual DIP Switch - Configurations stored EEPROM(Boot Magic)
24* Locking CapsLock - Mechanical switch support for CapsLock
25* Breathing Sleep LED - Sleep indicator with charm during USB suspend
26
27
28Projects
29--------
30You can find some keyboard specific projects under `converter` and `keyboard` directory.
31
32### converter
33* [ps2_usb](converter/ps2_usb/) - [PS/2 keyboard to USB][GH_ps2]
34* [adb_usb](converter/adb_usb/) - [ADB keyboard to USB][GH_adb]
35* [m0110_usb](converter/m0110_usb) - [Machintosh 128K/512K/Plus keyboard to USB][GH_m0110]
36* [terminal_usb](converter/terminal_usb/) - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
37* [news_usb](converter/news_usb/) - [Sony NEWS keyboard to USB][GH_news]
38* [x68k_usb](converter/x68k_usb/) - [Sharp X68000 keyboard to USB][GH_x68k]
39* [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?)
40* [pc98_usb](converter/pc98_usb/) - [PC98] to USB
41* [usb_usb](converter/usb_usb/) - USB to USB(experimental)
42
43### keyboard
44* [hhkb](keyboard/hhkb/) - [Happy Hacking Keyboard pro][GH_hhkb] **my main board**
45* [gh60](keyboard/gh60/) - [GH60] DIY 60% keyboard [prototype][GH60_proto] **my second board**
46* [hbkb](keyboard/hbkb/) - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
47* [hid_liber](keyboard/hid_liber/) - [HID liberation][HID_liber] controller (by alaricljs)
48* [phantom](keyboard/phantom/) - [Phantom] keyboard (by Tranquilite)
49* [IIgs_Standard](keyboard/IIgs/) - Apple [IIGS] keyboard mod(by JeffreySung)
50* [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired]
51
52[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
53[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
54[GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618
55[GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290
56[GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851
57[GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965
58[GH_news]: http://geekhack.org/showwiki.php?title=Island:25759
59[GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272
60[GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060
61[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483
62[HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
63[Phantom]: http://geekhack.org/index.php?topic=26742
64[GH60]: http://geekhack.org/index.php?topic=34959
65[GH60_proto]: http://geekhack.org/index.php?topic=37570.0
66[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
67[Sun]: http://en.wikipedia.org/wiki/Sun-3
68[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
69
70
71
72License
73-------
74**GPLv2** or later. Some protocol files are under **Modified BSD License**.
75LUFA, PJRC and V-USB stack have their own license respectively.
76
77
78
79Build Firmware and Program Controller
80-------------------------------------
81See [doc/build.md](doc/build.md).
82
83
84
85Change your keymap
86------------------
87See [doc/keymap.md](doc/keymap.md).
88
89
90
91Magic Comannds
92--------------
93To see help press `Magic` + `H`.
94
95 `Magic` key bind may be `LShift` + `RShift` in many project, but `Power` key on ADB converter. `Magic` keybind can be vary on each project, check `config.h` in project directory.
96
97Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed.
98
99 ----- Command Help -----
100 c: enter console mode
101 d: toggle debug enable
102 x: toggle matrix debug
103 k: toggle keyboard debug
104 m: toggle mouse debug
105 v: print device version & info
106 t: print timer count
107 s: print status
108 e: print eeprom config
109 n: toggle NKRO
110 0/F10: switch to Layer0
111 1/F1: switch to Layer1
112 2/F2: switch to Layer2
113 3/F3: switch to Layer3
114 4/F4: switch to Layer4
115 PScr: power down/remote wake-up
116 Caps: Lock Keyboard(Child Proof)
117 Paus: jump to bootloader
118
119**TBD**
120
121### Boot Magic Configuration - Virtual DIP Switch
122Boot Magic are executed during boot up time. Press Magic key below then pulgin keyboard cable.
123Note 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.
124
125#### General
126- Skip reading EEPROM to start with default configuration(`ESC`)
127- Clear configuration stored in EEPROM to reset configuration(`Backspace`)
128
129#### Bootloader
130- Kick up Bootloader(`B`)
131
132#### Debug
133- Debug enable(`D`)
134- Debug matrix enable(`D`+`X`)
135- Debug keyboard enable(`D`+`K`)
136- Debug mouse enable(`D`+`M`)
137
138#### Keymap
139- Swap Control and CapsLock(`Left Control`)
140- Change CapsLock to Control(`Casp Lock`)
141- Swap LeftAlt and Gui(`Left Alt`)
142- Swap RightAlt and Gui(`Right Alt`)
143- Disable Gui(`Left Gui`)
144- Swap Grave and Escape(`Grave`)
145- Swap BackSlash and BackSpace(`Back Slash`)
146
147#### Default Layer
148- Set Default Layer to 0(`0`)
149- Set Default Layer to 1(`1`)
150- Set Default Layer to 2(`2`)
151- Set Default Layer to 3(`3`)
152- Set Default Layer to 4(`4`)
153- Set Default Layer to 5(`5`)
154- Set Default Layer to 6(`6`)
155- Set Default Layer to 7(`7`)
156
157#### Caution
158Unintentional use of this feature will cause user confusion.
159
160TODO: Magic key combination to avoid unintentional press during plug in
161
162**TBD**
163
164
165Mechanical Locking support for CapsLock
166---------------------------------------
167To enable this feature define these two macros in `config.h` and use `KC_LCAP` for locking CapsLock in keymap instead of normal `KC_CAPS`. Resync option tries to keep lock switch state consistent with keyboard LED state.
168
169 #define CAPSLOCK_LOCKING_ENABLE
170 #define CAPSLOCK_LOCKING_RESYNC_ENABLE
171
172
173Start Your Own Project
174-----------------------
175**TBD**
176### Config.h Options
177#### 1. USB vendor/product ID and device description
178 #define VENDOR_ID 0xFEED
179 #define PRODUCT_ID 0xBEEF
180 #define MANUFACTURER t.m.k.
181 #define PRODUCT Macway mod
182 #define DESCRIPTION t.m.k. keyboard firmware for Macway mod
183
184#### 2. Keyboard matrix configuration
185 #define MATRIX_ROWS 8
186 #define MATRIX_COLS 8
187 #define MATRIX_HAS_GHOST
188
189
190
191Architecture
192------------
193 Architecture Diagram
194 +---------------+---------------+-------------+
195 | Host | Keyboard | Matrix, LED |
196 ___________ |-----------+-+ +-------------+ | +-----------|
197 / /| Keys/Mouse | Protocol |d| | Action | | | Protocol |
198 /__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix |
199 |.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________
200 || || |----------->| PJRC |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /|
201 || Host || | Console | iWRAP(BT)|e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / /
202 ||________||/.<-----------| UART |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / /
203 `_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ /
204 |_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/
205 +---------------------------------------------+ Keyboard
206
207
208
209Debuging
210--------
211Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
212
213You can use xprintf() to display debug info on `hid_listen`, see `common/xprintf.h`.
214
215
216
217Files and Directories
218-------------------
219### Top
220* common/ - common codes
221* protocol/ - keyboard protocol support
222* keyboard/ - keyboard projects
223* converter/ - protocol converter projects
224* doc/ - documents
225* common.mk - Makefile for common
226* protoco.mk - Makefile for protocol
227* rules.mk - Makefile for build rules
228
229### Common
230* host.h
231* host_driver.h
232* keyboard.h
233* command.h
234* keymap.h
235* action.h
236* keycode.h
237* matrix.h
238* led.h
239* mousekey.h
240* report.h
241* debug.h
242* print.h
243* bootloader.h
244* sendchar.h
245* timer.h
246* util.h
247
248### Keyboard Protocols
249* lufa/ - LUFA USB stack
250* pjrc/ - PJRC USB stack
251* vusb/ - Objective Development V-USB
252* iwrap/ - Bluetooth HID for Bluegiga iWRAP
253* ps2.c - PS/2 protocol
254* adb.c - Apple Desktop Bus protocol
255* m0110.c - Macintosh 128K/512K/Plus keyboard protocol
256* news.c - Sony NEWS keyboard protocol
257* x68k.c - Sharp X68000 keyboard protocol
258* serial_soft.c - Asynchronous Serial protocol implemented by software
259
260
261
262Conding Style
263-------------
264- Doesn't use Tab to indent, use 4-spaces instead.
265
266
267
268Other Keyboard Firmware Projects
269------------------
270See [doc/other_projects.md](doc/other_projects.md).
Imprint / Impressum