emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm bb0c5f4: Grab global prefix keys with num-lock mas


From: Chris Feng
Subject: [elpa] externals/exwm bb0c5f4: Grab global prefix keys with num-lock mask set.
Date: Sun, 13 Nov 2016 11:35:11 +0000 (UTC)

branch: externals/exwm
commit bb0c5f4c6b05e030e6afc29b08594d4141780223
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    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.
---
 exwm-input.el |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/exwm-input.el b/exwm-input.el
index a2f4780..9e98c62 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))))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]