![]() |
![]() |
![]() |
|
![]() | |
![]() |
![]() |
![]() |
![]() |
![]() |
Log In | Not a Member? |
Support
![]() |
![]() |
SYNTAX
SetKey <empty> | -r |
[modifierKey-]…key[-[modifierKey-]…key] DESCRIPTION The SetKey command allows you to assign keyboard equivalents for • built-in commands • script names • tool names • editor primitives You use SetKey to bind the key sequence, which may contain an optional modifier key and a regular key, to the command string. In this way you may reconfigure the keyboard layout of the editor primitives. You may want to do this to make the MPW Shell editor perform more like a favorite line editor, such as Emacs or vi. INPUT None OUTPUT None, unless SetKey is executed without any parameters or with a key description but no command. In the first case SetKey sends a list of commands to standard output that, when executed, restores the keyboard to the current set of key assignments. If a key is specified with no command, SetKey sends the commands currently assigned to that key to standard output. STATUS
SetKey can return the following status codes:
PARAMETERS empty Prints a list of commands to restore the keyboard to the current set of key assignments when there is no parameter. [modifierKey-]…key[-[modifierKey-]…key]
Specifies the key or combination of keys to use as a keyboard equivalent. If SetKey
is executed with a key description but without a command, it prints the commands currently assigned
to that key. The keys you can use are shown in the following list:
The optional modifier keys you can use are command optionshift control
Note commandString
Specifies the sequence of built-in commands, script names, tool names, and editor primitives that
are to be bound to the key sequence. The editor primitives you can use are shown below.
OPTIONS -r Reverts the key table to the default keyboard layout that was loaded from the resources in the MPW Shell. EXAMPLES The following command line binds the F11 key to a script that moves a window. SetKey f11 'MoveWindow {LeftPos} "{Active}"; SizeWindow {LeftPos} "{Active}"' Another example allows you to execute a command line using the key combination Control-X-Y. SetKey control-x-y 'Execute `Request "Enter a Command"`' Note that control-x-y means the sequence of pressing Control-X followed by pressing Y. In this case, Control-X is the meta-key of the sequence. Once you press Control-X, MPW is in a wait state and nothing is echoed to the active window. If you press a Y next, then the string is executed. Be sure you don't make meta-keys out of keys that are pressed often. SEE ALSO
|