diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-11-13T11·23+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-11-13T11·23+0800 |
commit | bb0c5f4c6b05e030e6afc29b08594d4141780223 (patch) | |
tree | 0654caa677556601a9610ede62a4060719526129 /exwm-input.el | |
parent | d0c2ca75f8ac78d87aba3e80902fb0f113b10279 (diff) |
Grab global prefix keys with num-lock mask set.
* exwm-input.el (exwm-input--update-global-prefix-keys): Grab global prefix keys with num-lock mask set, or those keys won't be activated when num-lock is enabled.
Diffstat (limited to 'exwm-input.el')
-rw-r--r-- | exwm-input.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/exwm-input.el b/exwm-input.el index a2f478068e6f..9e98c62e12c7 100644 --- a/exwm-input.el +++ b/exwm-input.el @@ -380,7 +380,14 @@ This value should always be overwritten.") (slot-value grab-key 'key) keycode) (when (or (= 0 keycode) (xcb:+request-checked+request-check exwm--connection - grab-key)) + grab-key) + ;; Also grab this key with num-lock mask set. + (when (/= 0 xcb:keysyms:num-lock-mask) + (setf (slot-value grab-key 'modifiers) + (logior (cdr keysym) + xcb:keysyms:num-lock-mask)) + (xcb:+request-checked+request-check exwm--connection + grab-key))) (user-error "[EXWM] Failed to grab key: %s" (single-key-description k)))))))))) |