[−][src]Struct sunrise_libuser::ps2::Keyboard
A managed keyboard.
Fields
inner: InnerKeyboard
Inner state
readable_event: ReadableEvent
An event triggered on keyboard update.
Implementations
impl Keyboard
[src]
pub fn new() -> Result<Self, Error>
[src]
Creates a keyboard by connecting to the ipc service.
pub fn read_key(&mut self) -> char
[src]
Waits for a single key press, and return its unicode representation.
pub fn read_keystate_async<'a>(
&'a mut self,
queue: WorkQueue
) -> impl Future<Output = HidKeyboardState> + Unpin + 'a
[src]
&'a mut self,
queue: WorkQueue
) -> impl Future<Output = HidKeyboardState> + Unpin + 'a
Asynchronously waits for a single keystate change, and return the raw change.
pub fn read_key_async<'a>(
&'a mut self,
queue: WorkQueue
) -> impl Future<Output = char> + Unpin + 'a
[src]
&'a mut self,
queue: WorkQueue
) -> impl Future<Output = char> + Unpin + 'a
Asynchronously waits for a single key press, and return its unicode representation.
pub fn try_read_key(&mut 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.
pub fn try_read_keystate(&mut self) -> Option<HidKeyboardState>
[src]
If a keystate change is pending, return the raw keystate. This can be used to implement poll-based or asynchronous reading from keyboard.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Keyboard
impl Send for Keyboard
impl Sync for Keyboard
impl Unpin for Keyboard
impl UnwindSafe for Keyboard
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> SizedIPCBuffer for T
[src]
fn size(&Self) -> usize
[src]
fn is_cool(usize, usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(usize, usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(usize, 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>,