Keyboard shortcuts

edited July 2013 in General
HI,
Is it possible to create keyboard shortcuts? for example for the edit>selection>subtraction?
If so ,how do i do it?
Thanks
shirly

Comments

  • edited July 2013

    Hi Shirly,

    yes it is. File->Setup, page Application/Key Bindings. Choose the item for which you want to install a shortcut, enter the desired key into the shortcut box right to the item list and hit "Ok".

    Matthias

  • "Key Bindings" no longer exists as of 2023, using version 0.28.7

    what is the new location?

  • Hi nmz787_intel
    In newer version, the kotkey can be set in customiz menu tab

  • ... and it is called "Customize Menu" now since you can turn off menu entries :)

  • I have a question about key-bindings. Maybe two.

    • Can a key be bound to a "macro"?
    • Can a key be bound to a chain of singlet commands, short of
      "macro-izing", by some syntax (like command;command )?

    I also recall there was a particular binding which was "hard"
    while others were "soft" (user can change). Don't remember
    which, why or why I cared at one point. My question (#3)
    there is, is that still so or is everything up for grabs.

    OK, #4 - is there a facility for saving out and reading back
    (onstartup, by klayoutrc?) a customized bindkey definition
    file?

  • Hi dick_freebird

    macro can be bind to hot key throuth macro properties setting page (wrench icon).
    key bind can be set at default key short cut option

    For change hot key binding using a script that bind to a hot key,
    here's an example of saving hot key and load back

    import pya
    import pickle
    
    def saveCurrentKeyBind(fileFullPath):    
        with open(fileFullPath, 'wb') as f:
            mainWindow  = pya.Application.instance().main_window().instance()    
            keyBindDict = mainWindow.get_key_bindings()
            pickle.dump(keyBindDict, f)
    
    def loadKeyBind(fileFullPath):
        with open(fileFullPath, 'rb') as f:
            mainWindow  = pya.Application.instance().main_window().instance()    
            keyBindDict = pickle.load(f)
            mainWindow.set_key_bindings(f)
    
    saveCurrentKeyBind("current_keybind.pickle")
    loadKeyBind("current_keybind.pickle")
    
  • Exactly :) Thanks @RawrRanger!

    Matthias

Sign In or Register to comment.