]> git.donarmstrong.com Git - tmk_firmware.git/blobdiff - ps2_usb/README
Workaround for Mac HID SET_IDLE behaviour.
[tmk_firmware.git] / ps2_usb / README
index 3c9eb14282e8c4cb8bb11efd9a2066cf691710e1..c10393e5e7abcf6d78bceecbbd75de6751fec515 100644 (file)
@@ -1,78 +1,91 @@
 PS/2 to USB keyboard converter
 ==============================
+This firmware converts PS/2 keyboard protocol to USB and for now supports only Scan Code Set 2.
+This will works on USB AVR(ATMega32U4, AT90USB) or V-USB.
 
-This firmware converts PS/2 keyboard protocol to USB.
+
+Features
+--------
+Mouse keys
+    You can emulates mouse move and button click using keyboard.
+System/Media control
+    You can sends Power event, Volume down/up and Mute.
+USB NKRO(actually 120KRO+8Modifiers)
+    You can tolggles NKRO feature.
+Keymap customization
+    You can customize keymaps easily by editing source code. See keymap.c.
+
+
+PS/2 signal handling implementations
+------------------------------------
+Following three methods are used to implement PS/2 signal handling.
+a. Simple and stupid wait & read loop(intensive use of cycles)
+    This is implemented with (expected) portable C code for reference. See ps2.c.
+b. Interrupt driven
+    See ps2_intr.c
+c. Using USART hardware module(no cycle needed)
+    This uses AVR USART function to recevie PS/2 signal and be used in V-USB converter.
+    See ps2_usart.c.
+
+
+Build Converter
+---------------
+Connect PS/2 keyboard into Teensy with 4 lines(Vcc, GND, Data, Clock).
+For a. Simple and stupid and b. Interrupt implementaion:
+    By default Clock is on PF0 and Data on PF1.
+    You can change this pin configuration by editing config_pjrc.h.
+    In this photo Vcc is yellow, GND is green, Data is red and Clock is black.
+    http://img17.imageshack.us/img17/7243/201101181933.jpg
+For c. USART implementation:
+    In case of Teensny(ATMega32u4) CLock is on PD5 and Data on PD2.
+
+
+Build Frimware
+--------------
+1. Edit Makefile for build options and MCU setting.
+    Use 'atmega32u4' for Teensy 2.0 or 'at90usb1286' for Teensy++ 2.0.
+2. make
+    Just type 'make' in a terminal.
+    Use '-f Makefile.pjrc_intr' option to use b. Interrupt.
+    Use '-f Makefile.pjrc_usart' option to use c. USART.
+    Use '-f Makefile.vusb' option to build V-USB converter.
+3. program with Teensy Loader.
+    http://www.pjrc.com/teensy/loader.html
 
 
-Demostration build
-------------------
-In this demo build, you can try several layouts,
-mouse keys and USB NKRO.
+Demonstration of Features
+-------------------------
+In default configuration, you can try several keymaps, mousekeys and USB NKRO.
+Use following magic key combinations to enable some features.
 
-Special keys:
-    Magic+0:    Qwerty with mouse keys(default)
-    Magic+1:    Qwerty
+keymaps and NKRO:
+    Magic+0:    Qwerty with mousekeys(default)
+    Magic+1:    Qwerty without mousekeys
     Magic+2:    Colemak
     Magic+3:    Dvorak
     Magic+4:    Workman
     Magic+N:    toggles NKRO/6KRO(6KRO by default)
-    Magic+Esc:  sends Power Event
+    Magic+Esc:  sends Power Event(Power button)
+
     where Magic=(LShift+RShift) or (LControl+RShift)
 
-Keybinds:
-    Fn0+(hjkl): Mouse key move(vi cursor)
+Fn layer function:
+    Fn0+(hjkl): Mousekey move(vi cursor like)
     Fn0+(yuio): Mouse wheel(left,down,up,right)
-    Fn0+space:  Mouse button1
-    Fn0+(mnb):  Mouse buttons(1,2,3)
+    Fn0+space:  Mouse left button
+    Fn0+(mnb):  Mouse buttons(m=left, n=right, b=middle)
     Fn0+(zxc):  Media control(Volup, Voldown, Mute)
-    Fn1+(hjkl): Cursor move(vi cursor)
+    Fn1+(hjkl): Cursor move(vi cursor like)
     Fn1+(nm,.): Cursor move(Home,PageDown,PageUp,End)
 
-    Fn2+(esdf): Mouse key move(invert T cursor)
-    Fn2+(qwrt): Mouse wheel(left,down,up,right)
-    Fn2+space:  Mouse button1
-    Fn2+(,./):  Media control(Volup, Voldown, Mute)
-    where Fn0=;, Fn1=/, Fn2=a
-
-
-Features
---------
-Mouse keys
-    You can emulates mouse move and button click using keyboard.
-System/Media control
-    You can sends Power event, Volume down/up and Mute.
-USB NKRO(actually 120KRO+8Modifiers)
-    You can tolggles NKRO/6KRO.(Not tested on Mac.)
-Keymap customization
-    You can customize keymaps easily by editing source code.
-
-
-Build
------
-0. Connect PS/2 keyboard to Teensy by 4 lines(Vcc, GND, Data, Clock).
-1. Define following macros for PS/2 connection in config.h:
-   PS2_DATA_PORT
-   PS2_DATA_PIN
-   PS2_DATA_DDR
-   PS2_DATA_BIT
-   PS2_CLOCK_PORT
-   PS2_CLOCK_PIN
-   PS2_CLOCK_DDR
-   PS2_CLOCK_BIT
-2. Edit Makefile for build options and MCU setting.
-2. make
-3. program Teensy.
-   http://www.pjrc.com/teensy/loader.html
+    where Fn0=;, Fn1=/
 
 
 Keymap
 ------
 You can change a keymap by editing code of keymap.c like following.
-How to define the keymap is probably obvious. You can find  key
-symbols in usb_keycodes.h.
-If you want to define more than one keymap, see hhkb/keymap.c and
-macway/keymap.c as examples. To define keymap(layer) switching may
-needs a bit of your effort at this time.
+How to define the keymap is probably obvious. You can find  key symbols in usb_keycodes.h.
+To define keymap layer switching may needs a bit of your effort at this time.
 
     /* Default Layer: plain keymap
      * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.     ,-----------.