diff --git a/ableos/src/arch/x86_64/drivers/vga.rs b/ableos/src/arch/x86_64/drivers/vga.rs index f2889994..c42817fa 100644 --- a/ableos/src/arch/x86_64/drivers/vga.rs +++ b/ableos/src/arch/x86_64/drivers/vga.rs @@ -116,7 +116,6 @@ use lazy_static::lazy_static; use spin::Mutex; use volatile::Volatile; -use crate::print; #[macro_export] macro_rules! kprint { ($($arg:tt)*) => ($crate::arch::drivers::vga::_kprint(format_args!($($arg)*))); diff --git a/ableos/src/arch/x86_64/interrupts.rs b/ableos/src/arch/x86_64/interrupts.rs index 86cc3872..ef6ab7ad 100644 --- a/ableos/src/arch/x86_64/interrupts.rs +++ b/ableos/src/arch/x86_64/interrupts.rs @@ -91,6 +91,7 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: InterruptStac print!(" "); WRITER.lock().backspace(); } + _ => { print!("{}", char::try_from(character).unwrap()); } @@ -101,7 +102,11 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: InterruptStac DecodedKey { kind: DecodedKeyKind::RawKey, value: key, - } => print!("{:?}", KeyCode::from(key)), + } => { + if KeyCode::from(key) != KeyCode::AltLeft { + print!("{:?}", KeyCode::from(key)) + } + } } } } diff --git a/ableos/src/log.rs b/ableos/src/log.rs index 82801829..93c74548 100644 --- a/ableos/src/log.rs +++ b/ableos/src/log.rs @@ -32,35 +32,66 @@ pub struct ANSISerialLogger; impl Log for ANSISerialLogger { fn debug(val: &str) { if LOG_STATE.lock().log_to_serial { - serial_println!("[{}Debug{}] {}", Fg::Blue, Reset, val); + serial_println!( + "[{}Debug{}][{}FakeTempTime{}] {}", + Fg::Blue, + Reset, + Fg::Green, + Reset, + val + ); } if LOG_STATE.lock().log_to_screen { - println!("[$BLUE$Debug$RESET$] {}", val); + println!("[$BLUE$Debug$RESET$][$GREEN$FakeTempTime$RESET$] {}", val); } } fn error(val: &str) { if LOG_STATE.lock().log_to_serial { - serial_println!("[{}Error{}] {}", Fg::Red, Reset, val); + serial_println!( + "[{}Error{}][{}FakeTempTime{}] {}", + Fg::Red, + Reset, + Fg::Green, + Reset, + val + ); } if LOG_STATE.lock().log_to_screen { - println!("[$RED$Error$RESET$] {}", val); + println!("[$RED$Error$RESET$][$GREEN$FakeTempTime$RESET$] {}", val); } } fn info(val: &str) { if LOG_STATE.lock().log_to_serial { - serial_println!("[{}Info{}] {}", Fg::LightWhite, Reset, val); + serial_println!( + "[{}Info{} ][{}FakeTempTime{}] {}", + Fg::LightWhite, + Reset, + Fg::Green, + Reset, + val + ); } if LOG_STATE.lock().log_to_screen { - println!("[$LIGHTGRAY$Info$RESET$] {}", val); + println!( + "[$LIGHTGRAY$Info$RESET$ ][$GREEN$FakeTempTime$RESET$] {}", + val + ); } } fn trace(val: &str) { if LOG_STATE.lock().log_to_serial { - serial_println!("[{}Trace{}] {}", Fg::Yellow, Reset, val); + serial_println!( + "[{}Trace{}][{}FakeTempTime{}] {}", + Fg::Yellow, + Reset, + Fg::Green, + Reset, + val + ); } if LOG_STATE.lock().log_to_screen { - println!("[$YELLOW$Trace$RESET$] {}", val); + println!("[$YELLOW$Trace$RESET$][$GREEN$FakeTempTime$RESET$] {}", val); } } }