Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
11 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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. Projects
  23. --------
  24. You can find some keyboard specific projects under `converter` and `keyboard` directory.
  25. ### converter
  26. * [ps2_usb](converter/ps2_usb/) - [PS/2 keyboard to USB][GH_ps2]
  27. * [adb_usb](converter/adb_usb/) - [ADB keyboard to USB][GH_adb]
  28. * [m0110_usb](converter/m0110_usb) - [Machintosh 128K/512K/Plus keyboard to USB][GH_m0110]
  29. * [terminal_usb](converter/terminal_usb/) - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
  30. * [news_usb](converter/news_usb/) - [Sony NEWS keyboard to USB][GH_news]
  31. * [x68k_usb](converter/x68k_usb/) - [Sharp X68000 keyboard to USB][GH_x68k]
  32. * [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?)
  33. * [pc98_usb](converter/pc98_usb/) - [PC98] to USB
  34. * [usb_usb](converter/usb_usb/) - USB to USB(experimental)
  35. ### keyboard
  36. * [hhkb](keyboard/hhkb/) - [Happy Hacking Keyboard pro][GH_hhkb] **my main board**
  37. * [gh60](keyboard/gh60/) - [GH60] DIY 60% keyboard [prototype][GH60_proto] **my second board**
  38. * [hbkb](keyboard/hbkb/) - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
  39. * [hid_liber](keyboard/hid_liber/) - [HID liberation][HID_liber] controller (by alaricljs)
  40. * [phantom](keyboard/phantom/) - [Phantom] keyboard (by Tranquilite)
  41. * [IIgs_Standard](keyboard/IIgs/) - Apple [IIGS] keyboard mod(by JeffreySung)
  42. * [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired]
  43. [GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
  44. [GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
  45. [GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618
  46. [GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290
  47. [GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851
  48. [GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965
  49. [GH_news]: http://geekhack.org/showwiki.php?title=Island:25759
  50. [GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272
  51. [GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060
  52. [GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483
  53. [HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
  54. [Phantom]: http://geekhack.org/index.php?topic=26742
  55. [GH60]: http://geekhack.org/index.php?topic=34959
  56. [GH60_proto]: http://geekhack.org/index.php?topic=37570.0
  57. [PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
  58. [Sun]: http://en.wikipedia.org/wiki/Sun-3
  59. [IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
  60. License
  61. -------
  62. **GPLv2** or later. Some protocol files are under **Modified BSD License**.
  63. LUFA, PJRC and V-USB stack have their own license respectively.
  64. Build Firmware and Program Controller
  65. -------------------------------------
  66. See [doc/build.md](doc/build.md).
  67. Change your keymap
  68. ------------------
  69. See [doc/keymap.md](doc/keymap.md).
  70. Magic Comannds
  71. --------------
  72. To see help press `Magic` + `H`.
  73. `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.
  74. Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed.
  75. ----- Command Help -----
  76. c: enter console mode
  77. d: toggle debug enable
  78. x: toggle matrix debug
  79. k: toggle keyboard debug
  80. m: toggle mouse debug
  81. p: toggle print enable
  82. v: print device version & info
  83. t: print timer count
  84. s: print status
  85. 0/F10: switch to Layer0
  86. 1/F1: switch to Layer1
  87. 2/F2: switch to Layer2
  88. 3/F3: switch to Layer3
  89. 4/F4: switch to Layer4
  90. PScr: power down/remote wake-up
  91. Caps: Lock Keyboard(Child Proof)
  92. Paus: jump to bootloader
  93. **TBD**
  94. ### Conguration with Boot Magic
  95. Boot Magic are executed during boot up time. Press Magic key below then pulgin keyboard cable.
  96. These settings are stored in EEPROM.
  97. - Clear configuration stored in EEPROM(`Backspace`)
  98. - Kick up Bootloader(`B`)
  99. - Debug enable(`D`)
  100. - Swap Control and CapsLock(`Left Control`)
  101. - Change CapsLock to Control(`Casp Lock`)
  102. - Swap LeftAlt and Gui(`Left Alt`)
  103. - Swap RightAlt and Gui(`Right Alt`)
  104. - Disable Gui(`Left Gui`)
  105. - Swap Grave and Escape(`Grave`)
  106. - Swap BackSlash and BackSpace(`Back Slash`)
  107. **TBD**
  108. Mechanical Locking support for CapsLock
  109. ---------------------------------------
  110. 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.
  111. #define CAPSLOCK_LOCKING_ENABLE
  112. #define CAPSLOCK_LOCKING_RESYNC_ENABLE
  113. Start Your Own Project
  114. -----------------------
  115. **TBD**
  116. ### Config.h Options
  117. #### 1. USB vendor/product ID and device description
  118. #define VENDOR_ID 0xFEED
  119. #define PRODUCT_ID 0xBEEF
  120. #define MANUFACTURER t.m.k.
  121. #define PRODUCT Macway mod
  122. #define DESCRIPTION t.m.k. keyboard firmware for Macway mod
  123. #### 2. Keyboard matrix configuration
  124. #define MATRIX_ROWS 8
  125. #define MATRIX_COLS 8
  126. #define MATRIX_HAS_GHOST
  127. Architecture
  128. ------------
  129. Architecture Diagram
  130. +---------------+---------------+-------------+
  131. | Host | Keyboard | Matrix, LED |
  132. ___________ |-----------+-+ +-------------+ | +-----------|
  133. / /| Keys/Mouse | Protocol |d| | Action | | | Protocol |
  134. /__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix |
  135. |.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________
  136. || || |----------->| PJRC |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /|
  137. || Host || | Console | iWRAP(BT)|e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / /
  138. ||________||/.<-----------| UART |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / /
  139. `_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ /
  140. |_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/
  141. +---------------------------------------------+ Keyboard
  142. Debuging
  143. --------
  144. Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
  145. You will see output from firmware like this.
  146. r/c 01234567
  147. 00: 00000000
  148. 01: 00000000
  149. 02: 00000000
  150. 03: 00000000
  151. 04: 00000000
  152. 05: 00000000
  153. 06: 00000000
  154. 07: 00000000
  155. ---- action_exec: start -----
  156. EVENT: 0307u(22511)
  157. Tapping: Tap release(2)
  158. ACTION: ACT_LAYER[5:2C]
  159. LAYER_PRESSED: Tap: unregister_code
  160. TAPPING_KEY=0307u(22511):2
  161. processed: 0307u(22511):2
  162. Tapping: End(Timeout after releasing last tap): FFFFu(22715)
  163. TAPPING_KEY=0000u(0):0
  164. Files and Directories
  165. -------------------
  166. ### Top
  167. * common/ - common codes
  168. * protocol/ - keyboard protocol support
  169. * keyboard/ - keyboard projects
  170. * converter/ - protocol converter projects
  171. * doc/ - documents
  172. * common.mk - Makefile for common
  173. * protoco.mk - Makefile for protocol
  174. * rules.mk - Makefile for build rules
  175. ### Common
  176. * host.h
  177. * host_driver.h
  178. * keyboard.h
  179. * command.h
  180. * keymap.h
  181. * action.h
  182. * keycode.h
  183. * matrix.h
  184. * led.h
  185. * mousekey.h
  186. * report.h
  187. * debug.h
  188. * print.h
  189. * bootloader.h
  190. * sendchar.h
  191. * timer.h
  192. * util.h
  193. ### Keyboard Protocols
  194. * lufa/ - LUFA USB stack
  195. * pjrc/ - PJRC USB stack
  196. * vusb/ - Objective Development V-USB
  197. * iwrap/ - Bluetooth HID for Bluegiga iWRAP
  198. * ps2.c - PS/2 protocol
  199. * adb.c - Apple Desktop Bus protocol
  200. * m0110.c - Macintosh 128K/512K/Plus keyboard protocol
  201. * news.c - Sony NEWS keyboard protocol
  202. * x68k.c - Sharp X68000 keyboard protocol
  203. * serial_soft.c - Asynchronous Serial protocol implemented by software
  204. Other Keyboard Firmware Projects
  205. ------------------
  206. See [doc/other_projects.md](doc/other_projects.md).