codesimian
Class Keyboard

java.lang.Object
  extended by codesimian.Keyboard

public class Keyboard
extends java.lang.Object

this class presses keys on the keyboard. Your computer thinks you pushed the keys, but CodeSimian pushed them. TODO: connect Keyboard to CodesimianOptions.


Nested Class Summary
static class Keyboard.IsKeyDown
           
static class Keyboard.KeyDown
           
static class Keyboard.KeyLocationX
          returns the horizontal position of a key on the keyboard, aligned with the number keys in row 1.
static class Keyboard.KeyLocationY
          same as KeyLocationX except measures key height on the keyboard instead of left/right position.
static class Keyboard.KeyUp
           
static class Keyboard.TypeThisStringOnKeyboard
           
 
Method Summary
static double keyIn(char key)
          returns fraction the key is down, 1 for all the way down, 0 for not pressed, -1 for fully pulled up (if it allows pulling the key up).
static void keyOut(char key, double fractionDown)
           
static void type(java.lang.String typeMe)
          the computer thinks you're really typing on the keyboard
static void type(java.lang.String typeMe, int minMillisPerKeyDownOrUp, int maxMillisPerKeyDownOrUp)
           
static void type(java.lang.String typeMe, int minMillisPerKeyDown, int maxMillisPerKeyDown, int minMillisPerKeyUp, int maxMillisPerKeyUp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

keyOut

public static void keyOut(char key,
                          double fractionDown)

keyIn

public static double keyIn(char key)
returns fraction the key is down, 1 for all the way down, 0 for not pressed, -1 for fully pulled up (if it allows pulling the key up). Keyboards of the future will have analog keys (and digital signal). Even in a game system as old as the Playstation2, most buttons are analog.


type

public static void type(java.lang.String typeMe)
the computer thinks you're really typing on the keyboard


type

public static void type(java.lang.String typeMe,
                        int minMillisPerKeyDownOrUp,
                        int maxMillisPerKeyDownOrUp)

type

public static void type(java.lang.String typeMe,
                        int minMillisPerKeyDown,
                        int maxMillisPerKeyDown,
                        int minMillisPerKeyUp,
                        int maxMillisPerKeyUp)