|
Smalltalk/X WebserverDocumentation of class 'KeyboardMap': |
|
|
Class: KeyboardMapInheritance:Object | +--Collection | +--Set | +--Dictionary | +--IdentityDictionary | +--KeyboardMap
Description:
instances of KeyboardMap are used for mapping keystrokes AND sequences
of keystrokes to a function key.
There is usually only one instance in the system - held in an instance
variable of Display.
The setup of this map is done in the 'smalltalk.rc' or one of the
'keyboard.rc' files during startup.
To add a mapping (for example, to attach the logical function 'DoIt' to
the key-combination Cmd-'d'):
|m|
m := Display keyboardMap.
m bindValue:#DoIt to:#Cmdd.
Key sequences can also be defined (hey emacs fans ;-) as in:
|m|
m := Display keyboardMap.
m bindValue:#DoIt to:#Ctrlx followedBy:#Ctrld
Key prefixes are defined in the DeviceWorkstation>>translateKey: method.
Typical prefixes are Cmd (for Alt or Meta), Ctrl etc.
Some keyboards offer both Alt and Meta keys - on those, the first has a
prefix of Alt, the second has Cmd as prefix. Keyboards with only an Alt
key will will create prefix codes of Cmd for that.
To remove a mapping, use the same value for both logical and physical key,
as in:
|m|
m := Display keyboardMap.
m bindValue:#Cmdd to:#Cmdd.
Related information:
WindowEvent
WindowSensor
WindowGroup
View
DeviceWorkstation
Instance protocol:accessing
|
|
|
ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 17 Dec 2025 10:04:29 GMT
|