98 |
mean -- for example, the number 9 is converted to the character Tab, |
mean -- for example, the number 9 is converted to the character Tab, |
99 |
not the distinct character Control-I. |
not the distinct character Control-I. |
100 |
|
|
101 |
Beware that character-to-event and event-to-character are not strictly |
Beware that character-to-event and event-to-character are not strictly |
102 |
inverse functions, since events contain much more information than the |
inverse functions, since events contain much more information than the |
103 |
ASCII character set can encode." |
ASCII character set can encode." |
104 |
ch) |
ch) |
105 |
|
|
214 |
(defun event-to-character (event &optional lenient) |
(defun event-to-character (event &optional lenient) |
215 |
"Returns the closest ASCII approximation to the given event object. |
"Returns the closest ASCII approximation to the given event object. |
216 |
If the event isn't a keypress, this returns nil. |
If the event isn't a keypress, this returns nil. |
217 |
If the second argument is non-nil, then this is lenient in its |
If the second argument is non-nil, then this is lenient in its |
218 |
translation; it will ignore modifier keys other than control and meta, |
translation; it will ignore modifier keys other than control and meta, |
219 |
and will ignore the shift modifier on those characters which have no |
and will ignore the shift modifier on those characters which have no |
220 |
shifted ASCII equivalent (Control-Shift-A for example, will be mapped to |
shifted ASCII equivalent (Control-Shift-A for example, will be mapped to |
221 |
the same ASCII code as Control-A.) If the second arg is nil, then nil |
the same ASCII code as Control-A.) If the second arg is nil, then nil |
222 |
will be returned for events which have no direct ASCII equivalent." |
will be returned for events which have no direct ASCII equivalent." |
223 |
(if (symbolp event) |
(if (symbolp event) |
224 |
(and lenient |
(and lenient |