Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Это архивный репозиторий. Вы можете его клонировать или просматривать файлы, но не вносить изменения или открывать задачи/запросы на слияние.

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