clean os/user codes for graph show
This commit is contained in:
parent
f2635c2dba
commit
2dfd195841
6 changed files with 7 additions and 224 deletions
|
@ -1,8 +1,5 @@
|
|||
use crate::drivers::bus::virtio::VirtioHal;
|
||||
use crate::{
|
||||
gui::{move_rect, reset},
|
||||
sync::UPIntrFreeCell,
|
||||
};
|
||||
use crate::sync::UPIntrFreeCell;
|
||||
use alloc::sync::Arc;
|
||||
use core::any::Any;
|
||||
use virtio_drivers::{VirtIOHeader, VirtIOInput};
|
||||
|
@ -49,21 +46,6 @@ impl InputDevice for VirtIOInputWrapper {
|
|||
virtio_input_decoder::DecodeType::Key(key, r#type) => {
|
||||
if r#type == KeyType::Press {
|
||||
match key {
|
||||
Key::C | Key::MouseLeft => {
|
||||
reset();
|
||||
}
|
||||
Key::W => {
|
||||
move_rect(0, -10);
|
||||
}
|
||||
Key::S => {
|
||||
move_rect(0, 10);
|
||||
}
|
||||
Key::A => {
|
||||
move_rect(-10, 0);
|
||||
}
|
||||
Key::D => {
|
||||
move_rect(10, 0);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue