AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
=>     R0 =     reason code:
           0     Keyboard present
           1     Key released
           2     Key pressed
           3     Notify driver of LED state
           4     Enable keyboard device drivers
           5-11     Reserved for system use

See PRM 5a-238.
KeyV 0
Keyboard present
=>     R0 =     0 (reason code)
     R1 =     ID
     R2 =     &4E6F4B64 ('NoKd') [5.00+]

After a successful initialisation by the keyboard device driver, the driver notifies the kernel with this reason code. If R2 contains the magic word 'NoKd', the kernel will disable its debouncing allowing, for example, a barcode reader to input characters faster than 10-15 cps. Debouncing can be reenabled by issuing this call with R2 set to 0.
KeyV 1, 2
=>     R0 =     1 or 2 (reason code)
     R1 =     low-level internal key number

A device driver must inform the kernel of keys being released or pressed by using these reason codes. However, the kernel must enable the device driver first.

See also:     key transition event
KeyV 3
=>     R0 =     3 (reason code)
     R1 =     LED status flags

The kernel calls KeyV with this reason code when the state of the keyboard LEDs changes. Keyboard device drivers must claim KeyV and install a routine to handle these calls by setting the keyboard's LEDs as requested.
LED status flags
Bit     /Meaning when set/

0     Scroll lock on
1     Num lock on
2     Caps lock on
3-31     reserved (ignore)
KeyV 4
=>     R0 =     4 (reason code)

KeyV 4 is called by the kernel to enable keyboard device drivers. The key released and key pressed reason codes must not be used by the device driver until it receives this reason code.

This is not a reset call and may be seen many times whilst the device driver is active. It does mean that the kernel has flushed its table of keys that are held down, so the device driver should do the same if appropriate.

[sh-index] Back to list of manuals