mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
adjust keyboard emulation delays for better compatibility
This commit is contained in:
parent
4a23cf671d
commit
b69fbfdd01
1 changed files with 2 additions and 1 deletions
|
|
@ -251,10 +251,11 @@ fn xmain() -> ! {
|
||||||
let auto_up = if autoup == 1 {true} else {false};
|
let auto_up = if autoup == 1 {true} else {false};
|
||||||
keyboard.interface().write_report(&codes).ok();
|
keyboard.interface().write_report(&codes).ok();
|
||||||
keyboard.interface().tick().unwrap();
|
keyboard.interface().tick().unwrap();
|
||||||
|
tt.sleep_ms(50).ok();
|
||||||
if auto_up {
|
if auto_up {
|
||||||
tt.sleep_ms(20).ok();
|
|
||||||
keyboard.interface().write_report(&[]).ok(); // this is the key-up
|
keyboard.interface().write_report(&[]).ok(); // this is the key-up
|
||||||
keyboard.interface().tick().unwrap();
|
keyboard.interface().tick().unwrap();
|
||||||
|
tt.sleep_ms(50).ok();
|
||||||
}
|
}
|
||||||
xous::return_scalar(msg.sender, 0).unwrap();
|
xous::return_scalar(msg.sender, 0).unwrap();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue