diff --git a/src/bridge/ui_commands.rs b/src/bridge/ui_commands.rs index effc282..7f9467b 100644 --- a/src/bridge/ui_commands.rs +++ b/src/bridge/ui_commands.rs @@ -1,6 +1,7 @@ use nvim_rs::Neovim; use nvim_rs::compat::tokio::Compat; use tokio::process::ChildStdin; +use log::trace; #[derive(Debug, Clone)] pub enum UiCommand { @@ -18,6 +19,7 @@ impl UiCommand { nvim.ui_try_resize(width.max(10) as i64, height.max(3) as i64).await .expect("Resize failed"), UiCommand::Keyboard(input_command) => { + trace!("Keyboard Input Sent: {}", input_command); nvim.input(&input_command).await .expect("Input failed"); }, diff --git a/src/window.rs b/src/window.rs index b8a9beb..b6df6e7 100644 --- a/src/window.rs +++ b/src/window.rs @@ -1,7 +1,7 @@ use std::time::{Duration, Instant}; use std::thread::sleep; -use log::{info, debug, error}; +use log::{info, trace, debug, error}; use skulpin::{LogicalSize, PhysicalSize}; use skulpin::sdl2; use skulpin::sdl2::event::Event; @@ -109,6 +109,7 @@ pub fn ui_loop() { Event::Quit {..} => break 'running, Event::Window {..} => REDRAW_SCHEDULER.queue_next_frame(), Event::KeyDown { keycode: Some(keycode), keymod: modifiers, .. } => { + trace!("KeyDown Received: {}", keycode); if let Some((key_text, special)) = parse_keycode(keycode) { let will_text_input = @@ -127,6 +128,7 @@ pub fn ui_loop() { } }, Event::TextInput { text, .. } => { + trace!("Keyboard Input Received: {}", &text); if ignore_text_input { ignore_text_input = false; } else {