Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiGetBindKeys

hiGetBindKeys(
t_applicationType
[ g_alsoInherited ]
)
=> l_bindkeyList / nil

Description

Returns the list of bindkeys that are set for an application.

Arguments

t_applicationType

Application types that have been registered using either hiRegisterBindKeyPrefix or deRegApp.

g_alsoInherited

If this argument is specified, and it is not nil nor is the applicationType specified an alias, then the returned list will also include bindkeys that have been defined for the root application.

The inherited keys are listed first. Therefore, if a key appears twice in the list, then the second listed will be the one that is defined for the alias application. Otherwise, there is no way to distinguish one from the other if g_alsoInherited is not nil.

Value Returned

l_bindkeyList

A list, each element of which is a list of the following form:

list(t_key t_function/nil [t_EFfunction])

where:

  • t_key is a string specifying the key sequence, such as "Ctrl<Key>w".
  • t_function is a string specifying the SKILL function to which the key is bound. If the key is not bound to any function but does have an enterfunction binding, t_function is nil.
  • t_EFfunction is an optional string specifying the enterfunction binding for the key.

nil

There are no bindkeys set for t_applicationType, or t_applicationType is not registered.

Examples

The following example retrieves all bindkeys related to VLS-EXL.

hiGetBindKeys("VLS-EXL")

The following example retrieves all bindkeys related to the CIW.

hiGetBindKeys("Command Interpreter")
(("<Key>F3" "hiToggleEnterForm()") 
    ("<Key>Help" "hiHelp('window 'ciw window(1))") 
    ("<Key>F1" "hiHelp('window 'ciw window(1))")
)

The following example retrieves all bindkeys related to the Graphics Browser.

hiGetBindKeys("Graphics Browser")
(("Shift<Btn1Down>" "mouseAddSelectPt()" "mouseAddSelectPt()") 
    ("<Key>F3" nil "hiToggleEnterForm()") 
    ("Shift<Key>F4" "geToggleAreaSelectOption()") 
    ("None<Btn5Down>" "geScroll(nil \"s\" nil)") 
    ("None<Btn1Down>(2)" nil "mouseFinishPt()")
    ("<DrawThru3>" "hiZoomIn()" "hiZoomIn()") 
    ("Ctrl<Btn5Down>" "hiZoomOutAtMouse()") 
    ("None<Btn3Down>(2)" nil "hiToggleEnterForm()") 
    ("None<Btn2Down>" "hiRepeat()" "") 
    ("<DrawThru1>" "geSingleSelectBox()" "geSingleSelectBox()")
    ("Shift<Btn2Down>" "" "") 
    ("Shift<DrawThru3>" "hiZoomOut()" "hiZoomOut()") 
    ("Ctrl<DrawThru1>" "geSubSelectBox()" "geSubSelectBox()") 
    ("<Key>BackSpace" nil "deletePoint()") 
    ("None<Btn4Down>" "geScroll(nil \"n\" nil)")
    ("Shift<Btn5Down>" "geScroll(nil \"e\" nil)") 
    ("Shift<Btn4Down>" "geScroll(nil \"w\" nil)") 
    ("<Key>F4" "geTogglePartialSelect()") 
    ("Ctrl<Btn4Down>" "hiZoomInAtMouse()") 
    ("Ctrl<Key>Tab" "hiLowerWindow(hiGetCurrentWindow())")
    ("None<Btn3Down>" "mousePopUp()" "mousePopUp()") 
    ("<Key>Escape" nil "cancelEnterFun()") 
    ("None<Btn1Down>" "mouseSingleSelectPt()" "mouseAddPt(t)") 
    ("<Key>F1" "hiHelp('window deGetAppInfo(deGetEditViewType(hiGetCurrentWindow()))->appName)") 
    ("Shift<DrawThru1>" "geAddSelectBox()" "geAddSelectBox()")
    ("Ctrl<Btn1Down>" "mouseSubSelectPt()" "mouseSubSelectPt()")
)

The following example uses hiSetBindKey for user-defined applications:

hiRegisterBindKeyPrefix("RootApp")
hiRegisterBindKeyPrefix("SubApp")
hiInheritBindKey("SubApp" "RootApp")
hiSetBindKey("RootApp" "<Key>T" "printf(\"test message RootApp\")")
hiSetBindKey("RootApp" "<Key>Q" "printf(\"RootApp - Key Q\")")

The following example retrieves all bindkeys for applications at one level:

hiGetBindKeys("SubApp")
("<Key>Q" "printf(\"SubApp - Key Q\")"))
hiGetBindKeys("RootApp")
(("<Key>Q" "printf(\"RootApp - Key Q\")") 
    ("<Key>T" "printf(\"test message RootApp\")")
)

The following example retrieves all bindkeys from all levels from sub application to root application:

hiGetBindKeys("SubApp" t)
(("<Key>Q" "printf(\"RootApp - Key Q\")") 
    ("<Key>T" "printf(\"test message RootApp\")") 
    ("<Key>Q" "printf(\"SubApp - Key Q\")")
)

In case the application does not have a root application, bindkeys for only one level are returned:

hiGetBindKeys("RootApp" t)
    (("<Key>Q" "printf(\"RootApp - Key Q\")") 
    ("<Key>T" "printf(\"test message RootApp\")")

)

Related Topics

Bindkey Functions

hiRegisterBindKeyPrefix

hiSetBindKey


Return to top
 ⠀
X