SERIES BINDKEYS HELP NEEDED

Discussion in 'Cadence' started by jainmanish123, Jun 27, 2006.

  1. Hi Frnds

    I am interested in knowing that how can i make bind keys with series of
    key strokes
    eg shift+33 or
    CTRL+22 like wise

    Thanks
    Mannu
     
    jainmanish123, Jun 27, 2006
    #1
  2. jainmanish123

    wre Guest

    Hello Mannu,

    In my customizations I use this regularly. Note that if you use
    Shift+33, Shift+3 is not possible anymore (in my solution). It is
    possible to add some timer to check if you type Shift+33 fast
    enough to distinguish between Shift+3, Shift+4, Shift+33 and
    Shift+34. But this is not what I implemented. Secondly,
    cadence shortcuts never use the Alt key, so I normally use this
    key for custom bindkeys. In my implementation, the first key
    sets the mode. And if you repeat a certain command, you
    don't need to type it again. Example:
    Alt-o: Set via mode,
    Alt-3: add via3.
    Alt-3: Add another via3.
    Alt-0: Clear mode (is done automatically if you don't use custom
    bindkeys for more than 2 min.)
    Alt-3: Toggle metal3 visibility.

    I placed my Cadence Virtuoso customizations
    on a blog. You can find it at

    http://relyveld.wordpress.com/cadence-page

    Greetings, William.
     
    wre, Jun 27, 2006
    #2
  3. jainmanish123

    Guest Guest

    It is possible to make bindkeys with a series of different keystrokes, such
    as shift+34 or ctrl+23, but not using the same key. Note, however, that this
    is not supported.

    However, if there is a bindkey for the first key in the sequence, that will
    be executed as well. Also, all keys must be held down. For example, for
    a definition like "Shift<Key>2,<Key>3", you will first press and hold Shift,
    then press and hold 2, then press 3 while holding Shift and 2.

    If anything is defined for Shift+2, that will be executed as well.

    But again, this is not supported, and in IC 6.1.0 will not work consistantly.

    In IC 6.1.0 the behavior will work as in IC 5.1.41 and previous releases when
    the keyboard focus is in the graphical drawing area, which uses an Xt canvas,
    but if the keyboard focus is on any Qt-based widgets the two-key sequence
    will not work at all -- only the single keys will work.

    So, in 5.1.41 and previous, if you have a definition for Shift+23 and Shift+2
    and Shift+3, if you press and hold Shift, then press and hold 2, then press 3
    the binding for Shift+2 will execute followed by the binding for Shift+23.

    In 6.1.0, if the keyboard focus is in the Xt drawing area, the same will
    occur. But if the focus is in a Qt widget (any of the widgets other than the
    drawing area), the same seres of keystrokes will execute the binding for
    Shift+2 followed by the binding for Shift+3 and the binding for Shift+23 will
    not execute.

    So, to repeat myself again: although you can do this, it is NOT SUPPORTED.

    We currently do not have plans to support multiple key sequences for bindkeys.

    -Pete Zakel
    ()

    "Beware of the Turing Tar-pit in which everything is possible but
    nothing of interest is easy."
     
    Guest, Jun 27, 2006
    #3
  4. Hi there

    I just want to know that what key sequence do i have to press for these
    bind keys used by you

    Thanks
    MJ

    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Down" "wrDecodeBindKeysSchematics( \"Alt-KP_2\")")
    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Next" "wrDecodeBindKeysSchematics( \"Alt-KP_3\")")
    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Left" "wrDecodeBindKeysSchematics( \"Alt-KP_4\")")
    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Begin" "wrDecodeBindKeysSchematics( \"Alt-KP_5\")")
    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Right" "wrDecodeBindKeysSchematics( \"Alt-KP_6\")")
    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Home" "wrDecodeBindKeysSchematics( \"Alt-KP_7\")")
    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Up" "wrDecodeBindKeysSchematics( \"Alt-KP_8\")")
    hiSetBindKey( "Schematics"
    "Alt<Key>KP_Prior" "wrDecodeBindKeysSchematics( \"Alt-KP_9\")")
     
    jainmanish123, Jun 28, 2006
    #4
  5. jainmanish123

    wre Guest

    Hello Mannu,

    All these bindkeys link to the same function which is used to
    decode the bindkey sequence:

    hiSetBindKey( "Schematics" "Alt<Key>KP_Down"
    "wrDecodeBindKeysSchematics( \"Alt-KP_2\")")

    In this function a big case construct is used to decode
    the bindkeys. Layout bindkey example:

    case( wrDecodeBindKeysText
    ...
    ( " Alt-o Alt-3"
    wrAddVia( "v3")
    )
    ...
    )

    In this case function wrDecodeBindKeysSchematics.
    Another function is used for the layout bindkeys. Each
    view needs its own decode function.

    Greetings, William.
     
    wre, Jun 28, 2006
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.