49df72ceda
When using an input method like IBus, the IM is expected to process key events before anything else. Currently this doesn't always work as expected, as the event filtering is done in the default handlers of the key-press and key-release events, e.g. only after other handlers have been run. To allow the IM to filter events earlier, move the code to a captured-event handler instead. https://bugzilla.gnome.org/show_bug.cgi?id=658325