Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Assign Global Shortcuts to Titanium Desktop Apps


How do you assign some global shortcuts to your Titanium Desktop Apps?

For example I would like on a shortcut at any time be able to show my app main window. Is it possible to do this right now with the current SDK?

Thank you!

— asked June 22nd 2010 by Guillaume De Lazzer
  • titanium desktop

1 Answer

  • You can detect the press of a key combination in javascript, there are plenty of plugins for frameworks that make this easy. (ex. jQuery).

    To show the app's main window you can use

    win = Titanium.UI.getMainWindow();
    — answered June 22nd 2010 by Logan Mortimer
    1 Comment
    • Thank you for your fast answer. But the shortcuts created that way wouldn't they be restrained to the application context?

      When I wrote global I meant OS-wise screenshots: I am in an other application and I could recall my application's main window with a shortcut.

      Thank you for your help!

      — commented June 23rd 2010 by Guillaume De Lazzer
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.