[−][src]Struct sunrise_keyboard::ps2::PRIMARY_PS2
Primary PS2 controller instance on a classical IBM/PC architecture.
Fields
__private_field: ()
Methods from Deref<Target = PS2>
fn handle_control_key(&self, key: HidKeyboardScancode, state: State)
[src]
Handle a control key scancode
fn key_to_letter(&self, key: LetterKey) -> char
[src]
Gets the letter from the key, accounting for shift and capslock
fn encode_modifiers(&self, state: State) -> u8
[src]
Get a bitfield representing the modifiers of this keyboard
fn has_read_key_event(&self) -> bool
[src]
Return true if the PS2 keyboard has an key event to read.
fn try_read_key_event(&self) -> Option<KeyEvent>
[src]
Tries to read a KeyEvent, grabs more bytes from the port if input is incomplete.
Core function used by both try_read_keyboard_state and try_read_key
fn try_read_keyboard_state(&self) -> Option<HidKeyboardState>
[src]
Return a representation of a single key press if any updates is availaible.
Key presses are bufferized: if nobody is calling read_key when the user presses a key, it will be kept in a buffer until read_key is called.
fn read_key(&self) -> char
[src]
Waits for a single key press, and return its unicode representation.
Key presses are bufferized: if nobody is calling read_key when the user presses a key, it will be kept in a buffer until read_key is called.
fn try_read_key(&self) -> Option<char>
[src]
If a key press is pending, return its unicode representation. This can be used to implement poll-based or asynchronous reading from keyboard.
fn event_irq(&self) -> &ReadableEvent
[src]
Get a ReadableEvent for the PS2 IRQ. Waiting on this event will wait until a keypress is detected. Note that once this event is triggered, it won't trigger again until read_key or try_read_key is called.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PRIMARY_PS2
impl Send for PRIMARY_PS2
impl Sync for PRIMARY_PS2
impl Unpin for PRIMARY_PS2
impl UnwindSafe for PRIMARY_PS2
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,