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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

README.md 5.2KB

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