Commit graph

6 commits

Author SHA1 Message Date
Chris Feng
37098a4009 Fix detection of modifier keys in Emacs events
* exwm-input.el (exwm-input--grab-global-prefix-keys)
(exwm-input--fake-key):
* exwm-xim.el (exwm-xim--handle-forward-event-request): X11 allows
multiple combinations of KEYSYM-MODIFIERS to generate a same
KEYSYM, thus the result of an Emacs event to KEYSYM-MODIFIERS
conversion is not necessarily unique.  Previously the result of
`xcb:keysyms:event->keysym' is misused as the modifiers returned is
actually the ones should be consumed.
2019-08-05 00:00:00 +00:00
Chris Feng
8a54504152 Handle (t . EVENT) format events in exwm-xim
* exwm-xim.el (exwm-xim--handle-forward-event-request): Ditto.
2019-06-09 00:00:00 +00:00
Chris Feng
75833e0c53 Fix character loss with exwm-xim
* exwm-xim.el (exwm-xim--handle-forward-event-request): Events unread
can either be reused by input methods or forwarded to X windows as is.
2019-06-09 00:00:00 +00:00
Chris Feng
672a5e2a23 Fix unreading 'return event
* exwm-xim.el (exwm-xim--event-pending): Drop unused variable.
(exwm-xim--handle-forward-event-request): Convert 'return back to ?\n
to avoid error.
2019-06-02 00:00:00 +00:00
Chris Feng
fe2336a11e Fix auto commit issue with input methods
* exwm-xim.el (exwm-xim--handle-forward-event-request): Factored out
from `exwm-xim--on-request' to make auto commit work.  With input
methods providing candidates the first candidate can be implicitly
selected if no further matching is possible.  The last event would be
stored in `unread-command-events' (at least for `quail-input-method')
and should be reused by the input method.
(exwm-xim--on-request): Use it.
2019-06-02 00:00:00 +00:00
Chris Feng
0f7269c4ec Add input method support
; The code is basically refactored from
; https://github.com/ch11ng/exim to get better maintenance.

* exwm-xim.el: New module making Emacs's builtin input methods usable
for interacting with X windows.

* exwm-core.el (exwm--intern-atom): New function for intern X11 atoms.
* exwm-input.el (exwm-input--init):
* exwm-manage.el (exwm-manage--init): Use it.
2019-02-06 00:00:00 +00:00