diff --git a/services/gam/src/contexts.rs b/services/gam/src/contexts.rs index 02022669c..640d0d311 100644 --- a/services/gam/src/contexts.rs +++ b/services/gam/src/contexts.rs @@ -161,7 +161,7 @@ impl ContextManager { gotinput_id: registration.gotinput_id, audioframe_id: registration.audioframe_id, focuschange_id: registration.focuschange_id, - rawkeys_id: None, + rawkeys_id: registration.rawkeys_id, vibe: false, imef_menu_mode: false, // this gets initialized on the first attempt to change predictors, not here @@ -631,21 +631,21 @@ impl ContextManager { if self.imef_active { // use the IMEF self.imef.send_keyevent(keys).expect("couldn't send keys to the IMEF"); - } else { - // forward the keyboard hits without any IME to the current context - log::debug!("forwarding raw key event"); - if let Some(context) = self.focused_context() { - if let Some(rawkeys_id) = context.rawkeys_id { - xous::send_message(context.listener, - xous::Message::new_scalar(rawkeys_id as usize, - keys[0] as u32 as usize, - keys[1] as u32 as usize, - keys[2] as u32 as usize, - keys[3] as u32 as usize, - )).expect("couldn't forward raw keys onto context listener"); - } - } } + + // forward the keyboard hits to the current context + log::debug!("forwarding raw key event"); + if let Some(context) = self.focused_context() { + if let Some(rawkeys_id) = context.rawkeys_id { + xous::send_message(context.listener, + xous::Message::new_scalar(rawkeys_id as usize, + keys[0] as u32 as usize, + keys[1] as u32 as usize, + keys[2] as u32 as usize, + keys[3] as u32 as usize, + )).expect("couldn't forward raw keys onto context listener"); + } + } } fn focused_context(&'_ self) -> Option<&'_ UxContext> {