Trait tfc::KeyboardContext[][src]

pub trait KeyboardContext {
    fn key_down(&mut self, key: Key) -> Result<(), Error>;
fn key_up(&mut self, key: Key) -> Result<(), Error>; fn key_click(&mut self, key: Key) -> Result<(), Error> { ... } }

A context that supports keyboard events.

Implementors of this trait are able to emit key events.

Required methods

fn key_down(&mut self, key: Key) -> Result<(), Error>[src]

Press down a key.

Arguments

  • key - The key to press down.

fn key_up(&mut self, key: Key) -> Result<(), Error>[src]

Release a key.

Arguments

  • key - The key to release.
Loading content...

Provided methods

fn key_click(&mut self, key: Key) -> Result<(), Error>[src]

Press and release a key.

This is equivalent to calling key_down followed by key_up.

Arguments

  • key - The key to press and release.
Loading content...

Implementors

Loading content...