Tutorial: application.setShortcuts

application.setShortcuts

Sets new shortcut configuration for current application. Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to be able to change shortcut states.

Config

{
    desktop: true,          // application has a shortcut on the desktop
    startMenu: false,       // application has no shortcut in the start menu
    systemStartup: true     // application will be launched on system startup
}

Example

var application = fin.desktop.Application.getCurrent();

application.setShortcuts({
    desktop: true,
    startMenu: false,
    systemStartup: true
}, function() {
    console.log("Successfully set new shortcut states");
}, function(error) {
    console.log("Failed to set new shortcut states. Error: ", error);
});