hiSetBindKey
hiSetBindKey( [t_applicationType] [t_key] [t_skill_cmd] ) =>t / nil
Description
Binds a SKILL command string to a keyboard key or a mouse sequence for an application.
Before setting bindkeys, the application should be registered either through deRegApp or hiRegisterBindKeyPrefix. Cadence applications are already registered. You can get a list of registered bindkey prefixes for applications that you are running with the hiGetBindKeyPrefixList function or the Key or Mouse Binding form (choose Options – Bindkeys in the CIW to get the form).
If the t_applicationType or t_key arguments are not specified, a bindkey form is displayed.
Arguments
Examples
The following are examples of various key bindings:
"Shift<Key>F2" (Shift key + F2 key)
"Ctrl Shift<Key>Escape" (Control key + Shift key + Esc key)
"<Key>3" (3 key)
When setting a bindkey to the comma key, spell out the word comma rather than using the comma character (,).
"<Key>comma"
"Shift<Key>comma"Value Returned"
Binds the Command Interpreter application with hiQuit using the bindkey None<Key>F6:
hiSetBindKey("Command Interpreter" "None<Key>F6"
"hiQuit( )")
=> t
Binds the Schematics application with hiZoomIn using the bindkey Shift<Key>z:
hiSetBindKey("Schematics" "Shift<Key>z"
"hiZoomIn(hiGetCurrentWindow( ))")
=> t
Binds the Schematics application with hiEditPropList using the bindkey Shift<Key>s:
hiSetBindKey("Schematics" "Shift Ctrl<Key>s"
"{println(\"Editing selected object \")
hiEditPropList(car(geGetSelectedSet( )))}")
=> t
Binds the Schematics application with mouseAddPt using the bindkey None<Btn1Down>EF:
hiSetBindKey("Schematics" "None <Btn1Down> EF"
"mouseAddPt( )")
=> t
Binds the Schematics application with hiZoomIn using the bindkey <DrawThru3>:
hiSetBindKey("Schematics" "<DrawThru3>" "hiZoomIn( )")
=> t
Binds the Schematics application with hiUnselectTextAll using the bindkey <Key>F8:
hiSetBindKey("Show File" "<Key>F8"
"hiUnselectTextAll(hiGetCurrentWindow())")
=> t
Additional Information
To define no action for a binding and stop inheritance, specify the string nil for t_key.
Use t_key in the following syntax:
“modifier_list<operator>detail(occurrences)”
Use the hiBindKeyModifiers functions to get a list of legal modifiers for your session. The following modifiers could be in that list:
-
Ctrl: Control modifier bit -
Shift: Shift modifier bit -
Meta: Meta key modifier -
Hyper: Hyper key modifier -
Super: Super key modifier -
Alt: Alt key modifier (legal only for mouse bindings and function keys, not for printable characters) -
None: No modifiers
All modifiers except Ctrl and Shift will be checked to ensure they are assigned to keys on the current keyboard. A warning message will be issued, and the bindkey will not be defined for any modifier that is not assigned to a keyboard key. The Ctrl and Shift modifiers are guaranteed to be assigned. The Caps Lock key cannot be specified as a modifier. Alt can be specified only with function keys and mouse bindings, not with printable characters (unless menu access keys are disabled.)
An exclamation point or a tilde is illegal in a bindkey string.
If None is specified, it means no modifiers can be asserted. This is also the equivalent of having no modifiers.
None <event> detail
<event> detail
These following operators are supported by t_key:
-
Btn1Down: Button 1 Press -
Btn2Down: Button 2 Press -
Btn3Down: Button 3 Press -
Btn4Down: Mouse scroll wheel up -
Btn5Down: Mouse scroll wheel down
Btn4Down(2)andBtn5Down(2)is ignored. -
Key: Key Press -
DrawThru: Button 1 Press and Motion -
DrawThru2: Button 2 Press and Motion -
DrawThru3: Button 3 Press and Motion
When performing a DrawThru operation, keyboard keys will be ignored except for the following keys which are hardcoded to the listed commands during DrawThru operations: -
Esc- which cancels the command. -
Arrow Keys- which pan by 20% in the appropriate direction. -
Z- which zooms in at the mouse. -
Shift+Z- which zooms out at the mouse.
Related Topics
Return to top