diff options
Diffstat (limited to 'converter/ps2_usb/README')
| -rw-r--r-- | converter/ps2_usb/README | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/converter/ps2_usb/README b/converter/ps2_usb/README new file mode 100644 index 000000000..c10393e5e --- /dev/null +++ b/converter/ps2_usb/README | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | PS/2 to USB keyboard converter | ||
| 2 | ============================== | ||
| 3 | This firmware converts PS/2 keyboard protocol to USB and for now supports only Scan Code Set 2. | ||
| 4 | This will works on USB AVR(ATMega32U4, AT90USB) or V-USB. | ||
| 5 | |||
| 6 | |||
| 7 | Features | ||
| 8 | -------- | ||
| 9 | Mouse keys | ||
| 10 | You can emulates mouse move and button click using keyboard. | ||
| 11 | System/Media control | ||
| 12 | You can sends Power event, Volume down/up and Mute. | ||
| 13 | USB NKRO(actually 120KRO+8Modifiers) | ||
| 14 | You can tolggles NKRO feature. | ||
| 15 | Keymap customization | ||
| 16 | You can customize keymaps easily by editing source code. See keymap.c. | ||
| 17 | |||
| 18 | |||
| 19 | PS/2 signal handling implementations | ||
| 20 | ------------------------------------ | ||
| 21 | Following three methods are used to implement PS/2 signal handling. | ||
| 22 | a. Simple and stupid wait & read loop(intensive use of cycles) | ||
| 23 | This is implemented with (expected) portable C code for reference. See ps2.c. | ||
| 24 | b. Interrupt driven | ||
| 25 | See ps2_intr.c | ||
| 26 | c. Using USART hardware module(no cycle needed) | ||
| 27 | This uses AVR USART function to recevie PS/2 signal and be used in V-USB converter. | ||
| 28 | See ps2_usart.c. | ||
| 29 | |||
| 30 | |||
| 31 | Build Converter | ||
| 32 | --------------- | ||
| 33 | Connect PS/2 keyboard into Teensy with 4 lines(Vcc, GND, Data, Clock). | ||
| 34 | For a. Simple and stupid and b. Interrupt implementaion: | ||
| 35 | By default Clock is on PF0 and Data on PF1. | ||
| 36 | You can change this pin configuration by editing config_pjrc.h. | ||
| 37 | In this photo Vcc is yellow, GND is green, Data is red and Clock is black. | ||
| 38 | http://img17.imageshack.us/img17/7243/201101181933.jpg | ||
| 39 | For c. USART implementation: | ||
| 40 | In case of Teensny(ATMega32u4) CLock is on PD5 and Data on PD2. | ||
| 41 | |||
| 42 | |||
| 43 | Build Frimware | ||
| 44 | -------------- | ||
| 45 | 1. Edit Makefile for build options and MCU setting. | ||
| 46 | Use 'atmega32u4' for Teensy 2.0 or 'at90usb1286' for Teensy++ 2.0. | ||
| 47 | 2. make | ||
| 48 | Just type 'make' in a terminal. | ||
| 49 | Use '-f Makefile.pjrc_intr' option to use b. Interrupt. | ||
| 50 | Use '-f Makefile.pjrc_usart' option to use c. USART. | ||
| 51 | Use '-f Makefile.vusb' option to build V-USB converter. | ||
| 52 | 3. program with Teensy Loader. | ||
| 53 | http://www.pjrc.com/teensy/loader.html | ||
| 54 | |||
| 55 | |||
| 56 | Demonstration of Features | ||
| 57 | ------------------------- | ||
| 58 | In default configuration, you can try several keymaps, mousekeys and USB NKRO. | ||
| 59 | Use following magic key combinations to enable some features. | ||
| 60 | |||
| 61 | keymaps and NKRO: | ||
| 62 | Magic+0: Qwerty with mousekeys(default) | ||
| 63 | Magic+1: Qwerty without mousekeys | ||
| 64 | Magic+2: Colemak | ||
| 65 | Magic+3: Dvorak | ||
| 66 | Magic+4: Workman | ||
| 67 | Magic+N: toggles NKRO/6KRO(6KRO by default) | ||
| 68 | Magic+Esc: sends Power Event(Power button) | ||
| 69 | |||
| 70 | where Magic=(LShift+RShift) or (LControl+RShift) | ||
| 71 | |||
| 72 | Fn layer function: | ||
| 73 | Fn0+(hjkl): Mousekey move(vi cursor like) | ||
| 74 | Fn0+(yuio): Mouse wheel(left,down,up,right) | ||
| 75 | Fn0+space: Mouse left button | ||
| 76 | Fn0+(mnb): Mouse buttons(m=left, n=right, b=middle) | ||
| 77 | Fn0+(zxc): Media control(Volup, Voldown, Mute) | ||
| 78 | Fn1+(hjkl): Cursor move(vi cursor like) | ||
| 79 | Fn1+(nm,.): Cursor move(Home,PageDown,PageUp,End) | ||
| 80 | |||
| 81 | where Fn0=;, Fn1=/ | ||
| 82 | |||
| 83 | |||
| 84 | Keymap | ||
| 85 | ------ | ||
| 86 | You can change a keymap by editing code of keymap.c like following. | ||
| 87 | How to define the keymap is probably obvious. You can find key symbols in usb_keycodes.h. | ||
| 88 | To define keymap layer switching may needs a bit of your effort at this time. | ||
| 89 | |||
| 90 | /* Default Layer: plain keymap | ||
| 91 | * ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,-----------. | ||
| 92 | * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|Slp|Wak| | ||
| 93 | * `---' `---------------' `---------------' `---------------' `-----------' `-----------' | ||
| 94 | * ,-----------------------------------------------------------. ,-----------. ,---------------. | ||
| 95 | * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -| | ||
| 96 | * |-----------------------------------------------------------| |-----------| |---------------| | ||
| 97 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | | ||
| 98 | * |-----------------------------------------------------------| `-----------' |-----------| +| | ||
| 99 | * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| | | ||
| 100 | * |-----------------------------------------------------------| ,---. |---------------| | ||
| 101 | * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | | ||
| 102 | * |-----------------------------------------------------------| ,-----------. |-----------|Ent| | ||
| 103 | * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| | 0| .| | | ||
| 104 | * `-----------------------------------------------------------' `-----------' `---------------' | ||
| 105 | */ | ||
| 106 | KEYMAP( | ||
| 107 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, PWR, F13, F14, | ||
| 108 | GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, | ||
| 109 | TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, | ||
| 110 | CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, | ||
| 111 | LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, | ||
| 112 | LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT | ||
| 113 | ), | ||
| 114 | |||
| 115 | |||
| 116 | EOF | ||
