[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
keycode->keysym bug
Sender: KK@rigi.csc.ti.com
Date: Fri, 4 Aug 89 16:16:38 EDT
From: Kerry Kimbrough <Kimbrough@dsg.csc.ti.com>
The spec says that keysym-index can be nil, but this will immediately
cause aref to choke. Who's wrong --- spec or code?
(defun keycode->keysym (display keycode keysym-index)
(declare (type display display)
(type card8 keycode)
(type (or null card8) keysym-index)
(values keysym))
There are a lot of keycodes for which you can't unambiguously determine the
keysym from the keycode alone. I think keycode->keysym should take a state
argument like keycode->character:
(defun keycode->keysym (display keycode state &key keysym-index
(keysym-index-function #'default-keysym-index))
(declare (type display display)
(type card8 keycode)
(type card16 state)
(type (or null card8) keysym-index)
(type (or null (function (string-char card16 boolean card8) card8))
keysym-index-function))
(declare-values (or null keysym))
...)