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

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