A program called xlisten (written in C) grabs keystrokes from the X server and for each key pressed or released outputs a line of data describing the event, including which key was pressed or released and the latency in milliseconds since the last event. These raw data are passed by the shell to the main program (written in Java) which has three distinct input modules to process the three input event types: bigrams, trigrams, and word-grams. Each keystroke can be processed simultaneously by these modules and the results combined or compared. The three input modules have a common output format which is sent to the statistics module. The statistics module has two modes: train and predict. In training mode, it incorporates each new event into its model. In predict mode (and incidentally also during training) it computes the probability of the model given the event. The user interface module, in addition to providing controls, plots a graph of these recent probability results.