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 5.8KB

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