Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 8.8KB

9 years ago
9 years ago
11 years ago
9 years ago
8 years ago
11 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. TMK Keyboard Firmware Collection
  2. ================================
  3. This repository includes keyboard and converter firmware projects built with [`tmk_core`][tmk_core] keyboard library.
  4. The latest source code is available here: <http://github.com/tmk/tmk_keyboard>
  5. Updates
  6. -------
  7. #### 2017/01/11
  8. Changed action code for `ACTION_LAYER_MODS` and this may cause incompatibility with existent shared URL and downloaded firmwware of keymap editor. If you are using the action you just have to redefine it on keymap editor. Existent keymap code should not suffer.
  9. #### 2016/06/26
  10. Keymap framework was updated. `fn_actions[]` should be defined as `action_t` instead of `uint16_t`. And default code for keymap handling is now included in core you just need define `uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]` and `action_t fn_actions[]`.
  11. #### 2016/06/22
  12. 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>
  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. #### 2015/04/22
  16. Core library was separated to other branch `core`. <https://github.com/tmk/tmk_keyboard/tree/core>
  17. In `Makefile` you need to set `TMK_DIR` to indicate core library location now.
  18. TMK_DIR = ../../tmk_core
  19. Projects
  20. --------
  21. You can find some keyboard specific projects under `converter` and `keyboard` directory.
  22. ### converter
  23. * [ps2_usb](converter/ps2_usb/) - [PS/2 keyboard to USB][GH_ps2]
  24. * [adb_usb](converter/adb_usb/) - [ADB keyboard to USB][GH_adb]
  25. * [m0110_usb](converter/m0110_usb) - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
  26. * [terminal_usb](converter/terminal_usb/) - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
  27. * [news_usb](converter/news_usb/) - [Sony NEWS keyboard to USB][GH_news]
  28. * [x68k_usb](converter/x68k_usb/) - [Sharp X68000 keyboard to USB][GH_x68k]
  29. * [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?)
  30. * [pc98_usb](converter/pc98_usb/) - [PC98] to USB
  31. * [usb_usb](converter/usb_usb/) - [USB to USB][GH_usb]
  32. * [ibm4704_usb](converter/ibm4704_usb) - [IBM 4704 keyboard to USB][GH_ibm4704]
  33. * [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)
  34. ### keyboard
  35. * [hhkb](keyboard/hhkb/) - [Happy Hacking Keyboard pro][GH_hhkb] **my main board**
  36. * [alps64](keyboard/alps64/) - [Alps64 PCB](https://geekhack.org/index.php?topic=69740.0)
  37. * [hbkb](keyboard/hbkb/) - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
  38. * [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity]
  39. * [gh60](keyboard/gh60/) - [GH60] DIY 60% keyboard [prototype][GH60_proto] **my second board**
  40. * [onekey](keyboard/onekey/) - Simple one key keyboard example
  41. ### Projects based tmk_keyboard or tmk_core
  42. https://github.com/tmk/tmk_keyboard/wiki/TMK-Based-Projects
  43. [GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
  44. [GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618
  45. [GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290
  46. [GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851
  47. [GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965
  48. [GH_news]: http://geekhack.org/showwiki.php?title=Island:25759
  49. [GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272
  50. [GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060
  51. [GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483
  52. [GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0
  53. [GH60]: http://geekhack.org/index.php?topic=34959
  54. [GH60_proto]: http://geekhack.org/index.php?topic=37570.0
  55. [PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
  56. [Sun]: http://en.wikipedia.org/wiki/Sun-3
  57. [Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit
  58. [tmk_core]: https://github.com/tmk/tmk_core
  59. License
  60. -------
  61. **GPLv2** or later. Some protocol files are under **Modified BSD License**.
  62. Third party libraries like LUFA, PJRC and V-USB have their own license respectively.
  63. Build Firmware and Program Controller
  64. -------------------------------------
  65. See [tmk_core/doc/build.md](tmk_core/doc/build.md).
  66. Change your keymap
  67. ------------------
  68. See [tmk_core/doc/keymap.md](tmk_core/doc/keymap.md).
  69. Magic Commands
  70. --------------
  71. To see help press `Magic` + `H`.
  72. `Magic` key combination is `LShift` + `RShift` in many projects, but `Power` key on ADB converter.
  73. `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. v: print device version & info
  82. t: print timer count
  83. s: print status
  84. e: print eeprom config
  85. n: toggle NKRO
  86. 0/F10: switch to Layer0
  87. 1/F1: switch to Layer1
  88. 2/F2: switch to Layer2
  89. 3/F3: switch to Layer3
  90. 4/F4: switch to Layer4
  91. PScr: power down/remote wake-up
  92. Caps: Lock Keyboard(Child Proof)
  93. Paus: jump to bootloader
  94. Boot Magic Configuration - Virtual DIP Switch
  95. ---------------------------------------------
  96. Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable.
  97. 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.
  98. 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).
  99. #### General
  100. - Skip reading EEPROM to start with default configuration(`ESC`)
  101. - Clear configuration stored in EEPROM to reset configuration(`Backspace`)
  102. #### Bootloader
  103. - Kick up Bootloader(`B`)
  104. #### Debug
  105. - Debug enable(`D`)
  106. - Debug matrix enable(`D`+`X`)
  107. - Debug keyboard enable(`D`+`K`)
  108. - Debug mouse enable(`D`+`M`)
  109. #### Keymap
  110. - Swap Control and CapsLock(`Left Control`)
  111. - Change CapsLock to Control(`Caps Lock`)
  112. - Swap LeftAlt and Gui(`Left Alt`)
  113. - Swap RightAlt and Gui(`Right Alt`)
  114. - Disable Gui(`Left Gui`)
  115. - Swap Grave and Escape(`Grave`)
  116. - Swap BackSlash and BackSpace(`Back Slash`)
  117. - Enable NKRO on boot(`N`)
  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. Mechanical Locking support
  128. --------------------------
  129. This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock`
  130. or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN
  131. UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res
  132. ync option tries to keep switch state consistent with keyboard LED state.
  133. #define LOCKING_SUPPORT_ENABLE
  134. #define LOCKING_RESYNC_ENABLE
  135. Start Your Own Project
  136. -----------------------
  137. 1. Add `tmk_core` into your repository using `git submodule` or `git subtree`.
  138. 2. Copy files from `tmk_keybaord` or other project similar to yours
  139. 3. Edit those files to support your keyboard.
  140. See these as examples.
  141. - https://github.com/tmk/infinity_ergodox
  142. - https://github.com/tmk/whitefox
  143. Debugging
  144. --------
  145. Use PJRC's `hid_listen` to see debug messages. You can use xprintf() to display debug info, see `tmk_core/common/xprintf.h`.
  146. - https://www.pjrc.com/teensy/hid_listen.html
  147. Files and Directories
  148. -------------------
  149. ### Top
  150. * keyboard/ - keyboard projects
  151. * converter/ - protocol converter projects
  152. * tmk_core/ - core library
  153. * tmk_core/doc/ - documents
  154. Contribution
  155. ------------
  156. - Report bugs in github **[Issues](https://github.com/tmk/tmk_keyboard/issues)**.
  157. - Pull requets are also welcomed.
  158. Coding Style
  159. -------------
  160. - Doesn't use Tab to indent, use 4-spaces instead.
  161. Other Keyboard Firmware Projects
  162. ------------------
  163. 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.