How to grab focus and route keypresses to a GtkSearchEntry without losing the first character

I’m working on a simple Japanese-English dictionary app, and I want to make it so that typing automatically grabs focus for the GtkSearchEntry that serves as the search bar.

At first, I tried using set_key_capture_widget:

self.search_entry.set_key_capture_widget(Some(self.obj().as_ref()));

This routes keypresses into the search entry without grabbing focus. However, it seems that doing it this way prevents the IME from working, which is important here as entries are in Japanese. All keypresses come out as roman characters, e.g. typing kotoba enters kotoba and not ことば (with options to convert to kanji).

I’ve also tried setting an EventControllerKey, using PropagationPhase to try to route the keypress through after grabbing focus:

let key_controller = gtk::EventControllerKey::new();
key_controller.set_propagation_phase(gtk::PropagationPhase::Capture);
key_controller.connect_key_pressed(glib::clone!(
    #[weak(rename_to = this)]
    self,
    #[upgrade_or]
    glib::Propagation::Proceed,
    move |_, keyval, _, modifier| {
        let search_entry = &this.search_entry;
        if !search_entry.has_focus() {
            if let Some(ch) = keyval.to_unicode() {
                if !ch.is_control() && modifier.is_empty() {
                    search_entry.grab_focus();
                }
            }
        }
        glib::Propagation::Proceed
    }
));
self.obj().add_controller(key_controller);

I thought using Propagation would help here, but this loses the first character typed when grabbing focus, so typing kotoba gets おとば entered into the IME which returns completely different results.

Is there any way to do this properly, grabbing focus to the search entry on keypresses and routing all keypresses into the search entry without losing anything to ensure the IME works?