Fix nonfunctional backslash key
This commit is contained in:
parent
70c8ea2da5
commit
1659c934ac
10
src/main.rs
10
src/main.rs
@ -4,7 +4,7 @@ use std::{collections::VecDeque, os::mikros::{ipc, syscalls}, sync::OnceLock};
|
||||
|
||||
use controller::Ps2Controller;
|
||||
use parking_lot::Mutex;
|
||||
use pc_keyboard::{layouts::Us104Key, EventDecoder, HandleControl, ScancodeSet, ScancodeSet2};
|
||||
use pc_keyboard::{layouts::Us104Key, EventDecoder, HandleControl, KeyCode, KeyEvent, ScancodeSet, ScancodeSet2};
|
||||
|
||||
static CONTROLLER: OnceLock<Ps2Controller> = OnceLock::new();
|
||||
|
||||
@ -73,6 +73,14 @@ fn process_keyboard_data() {
|
||||
let Some(event) = scancode_decoder.advance_state(byte).unwrap() else {
|
||||
continue;
|
||||
};
|
||||
let event = if event.code == KeyCode::Oem7 {
|
||||
KeyEvent {
|
||||
code: KeyCode::Oem5,
|
||||
state: event.state,
|
||||
}
|
||||
} else {
|
||||
event
|
||||
};
|
||||
let Some(key) = event_decoder.process_keyevent(event) else {
|
||||
continue;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user