[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] About small keyboard problem
From: |
z_axis |
Subject: |
[STUMP] About small keyboard problem |
Date: |
Tue, 30 Oct 2012 11:31:47 +0800 |
User-agent: |
Opera Mail/11.62 (FreeBSD) |
I have ever reported that i cannot input digit in Evaling window using the
small keyboard before (NumLock is already on).
By hacking the input.lisp, i found the following result:
The #'read-key-and-selection will return different value for Main Keyboard
& Small Keyboard.
1 2 3 4 5
6 7 8 9
Main Keyboard (10 . 16) (11 . 16) (12 . 16) (13 . 16) (14 . 16) (15 .
16) (16 . 16) (17 . 16) (18 . 16)
Small Keyboard (87 . 16) (88 . 16) (89 . 16) (83 . 16) (84 . 16) (85 .
16) (79 . 16) (80 . 16) (81 . 16)
It causes #'process-input regard the Small Keyboard input is :error .
(defun read-key-or-selection ()
(loop for ev = (xlib:process-event *display* :handler
#'read-key-or-selection-handle-event :timeout nil) do
(cond ((stringp ev)
(return ev))
((and (consp ev)
(eq (first ev) :key-press))
(return (cdr ev))))))
(defun read-key-or-selection-handle-event (&rest event-slots &key display
event-key &allow-other-keys)
(declare (ignore display))
(case event-key
((or :key-release :key-press)
(apply 'input-handle-key-press-event event-slots))
(:selection-notify
(apply 'input-handle-selection-event event-slots))
(t nil)))
(defun input-handle-key-press-event (&rest event-slots &key event-key root
code state &allow-other-keys)
(declare (ignore event-slots root))
;; FIXME: don't use a cons
(list* event-key code state))
From above code, it seems there exists problem in #'xlib:process-event.
But i cannot know how to fix it ?
Please shed a light on me, thanks!
tmp.txt
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [STUMP] About small keyboard problem,
z_axis <=