Clean layer actions.
[tmk_keyboard.git] / README.md
CommitLineData
afb08462 1t.m.k. Keyboard Firmware Collection
2====================================
3This is a keyboard firmware with some features for Atmel AVR controller.
4
5Source code is available here: <http://github.com/tmk/tmk_keyboard>
6
7
8Features
9--------
784c6e39 10* Mouse key - Mouse control by keyboard.
11* System Control Key - Power Down, Sleep, Wake Up and USB Remote Wake up.
12* Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc.
13* USB NKRO - Can send 120 keys(+ 8 modifiers) simultaneously.
14* PS/2 mouse support - integrate PS/2 mouse(TrackPoint) into keyboard as composite device.
15* keyboard protocols - PS/2, ADB and old keyboard protocols.
afb08462 16
17
18Projects
19--------
20### converter
784c6e39 21* ps2_usb - [PS/2 keyboard to USB][GH_ps2]
22* adb_usb - [ADB keyboard to USB][GH_adb]
23* m0110_usb - [Machintosh 128K/512K/Plus keyboard to USB][GH_m0110]
24* terminal_usb - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
25* news_usb - [Sony NEWS keyboard to USB][GH_news]
26* x68k_usb - [Sharp X68000 keyboard to USB][GH_x68k]
afb08462 27
28### keyboard
784c6e39 29* hhkb - [Happy Hacking Keyboard professional][GH_hhkb]
30* macway - [Compact keyboard mod][GH_macway]
31* hbkb - [Happy Buckling sprint keyboard(IBM Model M mod)][GH_hbkb]
32
afb08462 33[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
34[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
35[GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618
36[GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290
37[GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851
38[GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965
81706d11 39[GH_news]: http://geekhack.org/showwiki.php?title=Island:25759
afb08462 40[GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272
41[GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060
81706d11 42[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483
afb08462 43
44
45
46Files & Directories
47-------------------
48### Top
784c6e39 49* common/ - common codes
50* protocol/ - keyboard protocol support
51* keyboard/ - keyboard projects
52* converter/ - protocol converter projects
53* doc/ - documents
54* common.mk - Makefile for common
55* protoco.mk - Makefile for protocol
56* rules.mk - Makefile for build rules
afb08462 57
58### Keyboard Protocols
784c6e39 59* pjrc/ - PJRC USB stack
60* vusb/ - Objective Development V-USB
61* iwrap/ - Bluetooth HID for Bluegiga iWRAP
62* ps2.c - PS/2 protocol
63* adb.c - Apple Desktop Bus protocol
64* m0110.c - Macintosh 128K/512K/Plus keyboard protocol
65* news.c - Sony NEWS keyboard protocol
66* x68k.c - Sharp X68000 keyboard protocol
afb08462 67
68
69Build & Program
70---------------
71### Build firmware
72To compile you need `AVR GCC`, `AVR Libc` and `GNU make`.
81706d11 73You can use [WinAVR][winavr] on Windows and [CrossPack][crosspack] on Mac.
afb08462 74
75 $ cd <project>
76 $ make
77
81706d11 78The firmware will be compiled as a file `tmk_<project>.hex`.
afb08462 79
81706d11 80[winavr]: http://winavr.sourceforge.net/
81[crosspack]: http://www.obdev.at/products/crosspack/index.html
afb08462 82
83### Program Controller
784c6e39 84If you have a proper program command in `Makefile` just type this.
afb08462 85
86 $ make program
87
88As for `Teensy` you can use `PJRC's loader` to program hex file. <http://www.pjrc.com/teensy/loader.html>
89
90
91
784c6e39 92Makefile Options
93----------------
94### 1. MCU and Frequency.
95
afb08462 96 MCU = atmega32u4 # Teensy 2.0
97 #MCU = at90usb1286 # Teensy++ 2.0
98 F_CPU = 16000000
99
784c6e39 100### 2. Features
afb08462 101Note that ***comment out*** to disable them.
784c6e39 102
afb08462 103 MOUSEKEY_ENABLE = yes # Mouse keys
104 PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
105 EXTRAKEY_ENABLE = yes # Enhanced feature for Windows(Audio control and System control)
106 NKRO_ENABLE = yes # USB Nkey Rollover
107
784c6e39 108### 3. Programmer
afb08462 109Set proper command for your controller, bootloader and programmer.
784c6e39 110
afb08462 111 # for PJRC Teensy
112 PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
113
114 # for Atmel AT90USBKEY
115 PROGRAM_CMD = dfu-programmer $(MCU) flash $(TARGET).hex
116
117 # avrdude
118 PROGRAM_CMD = avrdude -p $(MCU) -c avrispmkII -P USB -U flash:w:$(TARGET).hex
119 PROGRAM_CMD = avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex
120 PROGRAM_CMD = avrdude -p $(MCU) -c arduino -P COM1 -b 57600 -U flash:w:$(TARGET).hex
121
784c6e39 122config.h Options
123----------------
124### 1. USB vendor/product ID and device description
afb08462 125 #define VENDOR_ID 0xFEED
126 #define PRODUCT_ID 0xBEEF
127 /* device description */
128 #define MANUFACTURER t.m.k.
129 #define PRODUCT Macway mod
130 #define DESCRIPTION t.m.k. keyboard firmware for Macway mod
131
784c6e39 132### 2. Keyboard matrix configuration
afb08462 133 #define MATRIX_ROWS 8
134 #define MATRIX_COLS 8
135 #define MATRIX_HAS_GHOST
136
784c6e39 137### 3. Mouse keys
138
139### 4. PS/2 mouse
140
141### 5. COMMAND key combination
afb08462 142
784c6e39 143 #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)))
afb08462 144
145
146Keymap
147------
148
149
150Build your own firmware
151-----------------------
152
153
154Debuging
155--------
156Use PJRC's `hid_listen` to see debug messages and press `<COMMAND> + H` to debug menu.
157See `config.h` for definition of `<COMMAND>` key combination.
158
159
160Other Keyboard Projects
161-----------------------
162### PJRC USB Keyboard/Mouse Example
163- <http://www.pjrc.com/teensy/usb_keyboard.html>
164- <http://www.pjrc.com/teensy/usb_mouse.html>
165
166### kbupgrade
167- <http://github.com/rhomann/kbupgrade>
168- <http://geekhack.org/showwiki.php?title=Island:8406>
169
170### c64key
171- <http://symlink.dk/projects/c64key/>
172
173### rump
174- <http://mg8.org/rump/>
175- <http://github.com/clee/rump>
176
177### dulcimer
178- <http://www.schatenseite.de/dulcimer.html>
179
180### humblehacker-keyboard
181- <http://github.com/humblehacker>
182- <http://www.humblehacker.com/keyboard/>
183- <http://geekhack.org/showwiki.php?title=Island:6292>
184
185### ps2avr
186- <http://sourceforge.net/projects/ps2avr/>
Imprint / Impressum