Struct ps2::Keyboard [−][src]
pub struct Keyboard<'c> { /* fields omitted */ }
Expand description
A PS/2 keyboard.
This provides the functionality of a typical PS/2 keyboard, as well as PS/2 devices that act like keyboards, such as barcode scanners, card readers, fingerprint scanners, etc.
Examples
use ps2::Controller; let mut controller = unsafe { Controller::new() }; let mut keyboard = controller.keyboard();
Implementations
Set the state of the keyboard LEDs.
Run a diagnostic echo command.
Get the number corresponding to the current scancode set (1, 2, or 3).
Set the scancode set number (1, 2, or 3).
Attempt to obtain a device identifier for this keyboard.
pub fn set_typematic_rate_and_delay(
&mut self,
typematic_config: u8
) -> Result<(), KeyboardError>
pub fn set_typematic_rate_and_delay(
&mut self,
typematic_config: u8
) -> Result<(), KeyboardError>
Set the typematic repeat rate and delay.
Use the ‘Repeat rate’ and ‘Delay’ tables on this page to create the configuration byte.
Clear the data buffer and last typematic key, then enable scancodes.
Reset keyboard to power-on state and disable scancodes.
Reset keyboard to power-on state by clearing the data buffer and restoring all default key settings.
Set all keys to typematic only. This only has an effect if scancode set 3 is in use.
Set all keys to make/break only. This only has an effect if scancode set 3 is in use.
Set all keys to make only. This only has an effect if scancode set 3 is in use.
Set all keys to typematic and make/break. This only has an effect if scancode set 3 is in use.
Set a specific key to typematic only. This only has an effect if scancode set 3 is in use.
Set a specific key to make/break only. This only has an effect if scancode set 3 is in use.
Set a specific key to make only. This only has an effect if scancode set 3 is in use.
Get the last byte sent by the keyboard.
Reset the keyboard and perform a Basic Assurance Test.
Returns KeyboardError::SelfTestFailed
if the test fails.