mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
restore keyboard injector
This commit is contained in:
parent
46cdbcf18d
commit
14d6e703e9
1 changed files with 8 additions and 0 deletions
|
|
@ -81,6 +81,14 @@ impl Keyboard {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn inject_key(&self, c: char) {
|
||||
send_message(
|
||||
self.conn,
|
||||
Message::new_scalar(KeyboardOpcode::InjectKey.to_usize().unwrap(), c as u32 as usize, 0, 0, 0),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
/// Reveal the connection ID for use with unsafe FFI calls
|
||||
pub fn conn(&self) -> xous::CID { self.conn }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue