Override a default shortcut

RoboFont Forums Enhancements Override a default shortcut

This topic contains 5 replies, has 3 voices, and was last updated by  frederik 2 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6163

    bahman
    Participant

    Hello,

    I’ve written a script which is for archiving and every time I hit cmd+S out of habit I want that script to run and make a duplicate of my file in another folder. The only thing I don’t know is how to map the script to the save shortcut. Is there anyway to make this work?

    Thanks

    #6164

    danmilne
    Participant

    Hi Bahman,

    You could map the menu item “Save” to another key combination (say, control-s) using System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts > RoboFont. Then you could use a script manager like FastScripts to map Cmd-S to your script.

    Works for me, but I’m not using the latest OS.

    D

    #6165

    frederik
    Keymaster

    I would advise to subscribe to the notification fontDidSave and create a duplicate whenever that notification is been send.

    There is also a fontWillSave and fontWillAutoSave (in case you want to keep a version each 10 min)

    good luck

    #6166

    bahman
    Participant

    Thanks Dan and Fredrik,

    Fredrik should the script run every time robofont lunches? does it have effect on performance?

    #6167

    bahman
    Participant

    Actually Observer method worked pretty well, I used fontDidSave observer. Thanks Fredrik.

    #6170

    frederik
    Keymaster

    if you want to receive those notifications, just add this .py file to the start up scripts in your preferences. This doesn’t effect performance, unless to your part of the code, what is been executed when the notification is been send, takes a while.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.