I find it could be possible to monitor if we are in an input field of any GUI app via fcitx5
(when (bound-and-true-p exwm-enable)
(defvar exwm-inside-input-field nil)
(defun exwm-input-field-entry-handler (&rest args)
(setq exwm-inside-input-field t))
(defun exwm-input-field-exit-handler ()
(setq exwm-inside-input-field nil))
(dbus-register-signal
:session fcitx-service
nil ; PATH: Wildcard, listen on all object paths
fcitx-ic-interface "CurrentIM"
#'exwm-input-field-entry-handler)
(dbus-register-signal
:session fcitx-service
nil
fcitx-ic-interface "NotifyFocusOut"
#'exwm-input-field-exit-handler))
See the whole package here https://github.com/QiangF/imbot
I find it could be possible to monitor if we are in an input field of any GUI app via fcitx5
See the whole package here https://github.com/QiangF/imbot