The Psymouse is a specialized input controller for a manufacturing process. It is a standard USB mouse with a custom driver that converts mouse button clicks and y-axis movement to keystrokes. For example, if the Psymouse left button is pressed, the driver will issue a keystroke event that simulates the letter ‘m’ being pressed and released. If the Psymouse is moved up (+y), the keycode for ‘alt-t’ is generated, and if the Psymouse is moved down (-y), the keycode for ‘ctrl-shift-y’ is generated. The keycodes are arbitrary and are read from a settings file ([url removed, login to view]). Any valid keycode can be generated as a result of a Psymouse event. The keycode is placed in a keystroke event and the event is placed in the normal keyboard event stream to be passed to the current window that is the focus of the user’s input.
Keystroke events can be customized by the user according to the program she is running. For example, if the user has Excel as the top window and she moves the Psymouse up (+y) the letter ‘p’ appears at the current cursor location within Excel. If she then switches the focus window to Firefox and presses the Psymouse’s left button, ‘ctrl-t’ is issued and Firefox opens a new tab.
The keystrokes that are mapped to the Psymouse’s left-button press or movement events are custom configured in the [url removed, login to view] file. Keycode mappings can be set for any number of programs that the user wishes to provide custom input. The settings within the [url removed, login to view] are human readable and can be modified directly with a text editor. Each time the Psymouse is plugged into the system the Psydriver will reload the [url removed, login to view] file. For now, when the [url removed, login to view] file is changed, the Psymouse will be unplugged and re-plugged into the system. As part of a separate contract, a user program will be created that allows for easy editing of the [url removed, login to view] file. At that time, a method will be needed to signal the driver to reload the [url removed, login to view] file when it has changed, without having to unplug the Psymouse.