Previous: , Up: Terminal Input   [Contents][Index]


58.8.3 Recording Input

Function: recent-keys &optional number

This function returns a vector containing recent input events from the keyboard or mouse. By default, 100 events are recorded, which is how many recent-keys returns.

All input events are included, whether or not they were used as parts of key sequences. Thus, you always get the last 100 inputs, not counting keyboard macros. Events from keyboard macros are excluded because they are less interesting for debugging; it should be enough to see the events that invoked the macros.

If number is specified, not more than number events will be returned. You may change the number of stored events using set-recent-keys-ring-size.

Function: recent-keys-ring-size

This function returns the number of recent events stored internally. This is also the maximum number of events recent-keys can return. By default, 100 events are stored.

Function: set-recent-keys-ring-size size

This function changes the number of events stored by SXEmacs and returned by recent-keys.

For example, (set-recent-keys-ring-size 250) will make SXEmacs remember last 250 events and will make recent-keys return last 250 events by default.

Command: open-dribble-file filename

This function opens a dribble file named filename. When a dribble file is open, each input event from the keyboard or mouse (but not those from keyboard macros) is written in that file. A non-character event is expressed using its printed representation surrounded by ‘<…>’.

You close the dribble file by calling this function with an argument of nil.

This function is normally used to record the input necessary to trigger an SXEmacs bug, for the sake of a bug report.

(open-dribble-file "~/dribble")
     ⇒ nil

See also the open-termscript function (see Terminal Output).


Previous: , Up: Terminal Input   [Contents][Index]