Keyboard firmwares for Atmel AVR and Cortex-M
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

README 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. PS/2 to USB keyboard converter
  2. ==============================
  3. This firmware converts PS/2 keyboard protocol to USB.
  4. Demostration build
  5. ------------------
  6. In this demo build, you can try several layouts,
  7. mouse keys and USB NKRO.
  8. Special keys:
  9. Magic+0: Qwerty with mouse keys(default)
  10. Magic+1: Qwerty
  11. Magic+2: Colemak
  12. Magic+3: Dvorak
  13. Magic+4: Workman
  14. Magic+N: toggles NKRO/6KRO(6KRO by default)
  15. Magic+Esc: sends Power Event
  16. where Magic=(LShift+RShift) or (LControl+RShift)
  17. Keybinds:
  18. Fn0+(hjkl): Mouse key move(vi cursor)
  19. Fn0+(yuio): Mouse wheel(left,down,up,right)
  20. Fn0+space: Mouse button1
  21. Fn0+(mnb): Mouse buttons(1,2,3)
  22. Fn0+(zxc): Media control(Volup, Voldown, Mute)
  23. Fn1+(hjkl): Cursor move(vi cursor)
  24. Fn1+(nm,.): Cursor move(Home,PageDown,PageUp,End)
  25. Fn2+(esdf): Mouse key move(invert T cursor)
  26. Fn2+(qwrt): Mouse wheel(left,down,up,right)
  27. Fn2+space: Mouse button1
  28. Fn2+(,./): Media control(Volup, Voldown, Mute)
  29. where Fn0=;, Fn1=/, Fn2=a
  30. Features
  31. --------
  32. Mouse keys
  33. You can emulates mouse move and button click using keyboard.
  34. System/Media control
  35. You can sends Power event, Volume down/up and Mute.
  36. USB NKRO(actually 120KRO+8Modifiers)
  37. You can tolggles NKRO/6KRO.(Not tested on Mac.)
  38. Keymap customization
  39. You can customize keymaps easily by editing source code.
  40. Build for Teensy
  41. ----------------
  42. 0. Connect PS/2 keyboard to Teensy by 4 lines(Vcc, GND, Data, Clock).
  43. 1. Define following macros for PS/2 connection in config_pjrc.h:
  44. PS2_DATA_PORT
  45. PS2_DATA_PIN
  46. PS2_DATA_DDR
  47. PS2_DATA_BIT
  48. PS2_CLOCK_PORT
  49. PS2_CLOCK_PIN
  50. PS2_CLOCK_DDR
  51. PS2_CLOCK_BIT
  52. 2. Edit Makefile for build options and MCU setting.
  53. 2. make
  54. 3. program Teensy.
  55. http://www.pjrc.com/teensy/loader.html
  56. Build for V-USB
  57. ---------------
  58. 0. Build V-USB controller board and connect PS/2 keyboard.
  59. 1. Define macros in config_vusb.h if needed.
  60. 2. Edit Makefile.vusb for build options and MCU setting.
  61. 3. make -f Makefile.vusb
  62. 4. program your V-USB controller.
  63. Keymap
  64. ------
  65. You can change a keymap by editing code of keymap.c like following.
  66. How to define the keymap is probably obvious. You can find key
  67. symbols in usb_keycodes.h.
  68. If you want to define more than one keymap, see hhkb/keymap.c and
  69. macway/keymap.c as examples. To define keymap(layer) switching may
  70. needs a bit of your effort at this time.
  71. /* Default Layer: plain keymap
  72. * ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,-----------.
  73. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|Slp|Wak|
  74. * `---' `---------------' `---------------' `---------------' `-----------' `-----------'
  75. * ,-----------------------------------------------------------. ,-----------. ,---------------.
  76. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -|
  77. * |-----------------------------------------------------------| |-----------| |---------------|
  78. * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| |
  79. * |-----------------------------------------------------------| `-----------' |-----------| +|
  80. * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| |
  81. * |-----------------------------------------------------------| ,---. |---------------|
  82. * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
  83. * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
  84. * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| | 0| .| |
  85. * `-----------------------------------------------------------' `-----------' `---------------'
  86. */
  87. KEYMAP(
  88. ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, PWR, F13, F14,
  89. GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
  90. TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
  91. CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
  92. LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
  93. LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
  94. ),
  95. EOF