-
Notifications
You must be signed in to change notification settings - Fork 1
keyboardDaemon
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.)
All keyboards using KeyboardDaemon are given unique interrupt messages, all of which point kd.keystroke.
+---------+
| Port0 | <- (in heap) location, stored in kd.daemonlist
| Msg 0 |
| OptLoc0 |
| Port1 |
| Msg 1 |
| OptLoc1 |
| ... |
+---------+
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.)
Initializes the keyboard handler with enough room for slots many Generic Keyboard devices.
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