get-other-shift-key-code in key-event%
Since keyboard mappings vary, it is sometimes useful in key mappings
for a program to know the result that the keyboard would have
produced for an event if the Shift key had been toggled differently. The
get-other-shift-key-code produces that other mapping,
returning #f if the alternate mapping is
unavailable, otherwise returning the same kind of result as
get-key-code.
The
get-other-altgr-key-code method provides the same information with respect to the AltGr key
(i.e., Alt combined with Control) under Windows and X, or the Option
key under Mac OS X. The
get-other-shift-altgr-key-code method reports a mapping for in tha case that both Shift and AltGr/Option
were different from the actual event.
The
get-other-shift-key-code,
get-other-altgr-key-code, and
get-other-shift-altgr-key-code results all report key mappings where Caps Lock is off, independent
of whether Caps Lock was on for the actual event. The
get-other-caps-key-code method reports a mapping for in that case that the Caps Lock state
was treated opposite as for the
get-key-code result. (Caps Lock normally has either no effect or the same effect
as Shift, so further combinations involving Caps Lock and other
modifier keys would not normally produce further alternatives.)
Alternate mappings are not available for all events. Under Windows, alternate mappings are reported when they produce ASCII letters, ASCII digits, and ASCII symbols. Under Mac OS X, alternate mappings are available only when the Command key is pressed. Under X, alternate mappings are usually available.