Next: Menu Bars
Up: Primitive Actions
Previous: Check-box
- (mred:test:keystroke key [modifier . . .])
-
- key :
- char or integer
This value is used for the key-code in wx:key-event.
- modifier :
- a symbol from among: 'alt, 'control, 'meta, 'shift, 'noalt, 'nocontrol, 'nometa, 'noshift
Any number of modifiers may be given.
The 'shift or 'noshift modifier is implicitly set from key,
but may be overridden.
For example, 'shift is set for #\A
and #\$
but not for #\a
.
The default for 'alt, 'control and 'meta is not set.
In case of duplicate or conflicting modifiers,
the last one takes precedence.
In practice, only the modifiers 'alt, 'control and 'meta
are ever needed.
Simulates a keystroke by sending an event to the window
with the keyboard focus (which must have an on-char method).
- (send window on-char wx:key-event)
-
Before the window is given the key event, its ancestors are given the
option of handling the key event with pre-on-char.
Note:
To send the ``Enter'' key, use #\return
,
not #\newline
.
Note:
Control sequences, such as C-a (move to beginning of line),
are a single keystroke action:
(mred:test:keystroke #\a 'control)
PLT