You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SashaCrofter edited this page Jul 13, 2012
·
3 revisions
An instance of KeyboardDemon should be registered to any process that requires detection of keypresses. It requests an interrupt value from the operating system, and, when it detects that interrupt, writes the pressed key, if it is ASCII, to the location registered on its instantiation. (That location is, of course, incremented.)
The Handler
All keyboards using KeyboardDaemon are given unique interrupt messages, all of which point kd.keystroke.
Portx refers to a Generic Keyboard port, and the OptLocx following directly after refers to the current "options" selection, which contains all of the information necessary to support a single keyboard (and integrates with dview.)
Option Block
kd.init (slots)
Initializes the keyboard handler with enough room for slots many Generic Keyboard devices.
kd.newKeyboard (GenericKeyboard)
Defines a new keyboard in the first open memory location carried by kd.daemonlist, as defined kd.init, or adds a new one if it doesn't exist.
returns a pointer to the GenericKeyboard's OptLoc word