FlickStart available on Google Play use it with FlickNet also available on Google Play
Downloads  Home  About  Contact 

 The 'keys' Parameter


Many commands sent from FlickStart are designed to send keystrokes to a PC app using the 'keys' parameter in the extra data of the command.

The format of the keystrokes largely follow the format described by Microsoft here, but we have extended that format slightly and the deviations from the original format are described on this page.

The changes were made to deal with two issues ignored in the Microsoft version:

  • No means of utilising the Windows logo key

  • A need to insert a delay between sequences of characters in order to allow the PC to start and/or rearrange windows.

  • Qualifier Characters

    On the PC keyboard you use a sequence like Alt+F+X to close a window. That means you hold the Alt key down first, then press F and then X and finally let the Alt key come up again.

    The format provided by Microsoft for sending this sequence via a program rather than via a physical keyboard is '%(fx)'.

    The '%' character represents the Alt key being held down. The parentheses '()' contain the keystrokes to be sent while Alt is held down. The parenteses are not sent, but are used just to indicate the set of keys to be sent while the Alt key is held down.

    Microsoft provides three symbols for qualifier keys:

  • % - denotes the Alt key

  • ^ - denotes the Ctrl key

  • + - denotes the Shift key

  • To this list we have added the symbol '#' to denote the Windows logo key.

    This means the sequence '#(r)' produces an affect identical to holding down the Windows logo key, pressing 'r' and then letting go the Windows logo key. That sequence brings up the Windows 'Run' dialog.

    This longer sequence '#(r)cmd{ENTER}' utilises the 'Run' dialog to start a DOS window.

    It should be noted that all the qualifier symbols can't be sent to the PC unless they are 'escaped'. To send a '#' you need to send '{#}'

    This example minimizes all windows: #(m)

    This one restores the windows: #+(m)

    The Delay Character

    Mostly characters are being sent to the window on the PC which currently has focus, but when keys cause an action which requires a bit of time to complete (eg. starting an app which will bring it's own window into focus), we might need a delay before sending any more characters.

    The '!' character can be used in a string to cause a delay of around 200 milliseconds before the remainder of the characters in a sequence are sent. You can put in the '!' character multiple times to get a longer delay.

    As an example, we start a Notepad window, type some text into it and ask for the window to be closed. Delays are added in a few spots to give the Notepad app a chance to get started. The sequence looks like this:

        #(r)!!!notepad{ENTER}!!!!test text{ENTER}now try to close%(fx)

    Since the sequence didn't save the text, the attempted close leaves behind a dialog to save or discard!

    Privacy Policy