Adding a sleep or delay command to a text function

When you run a text function, Keybreeze will hide itself to make the previous window come into focus. Then it will copy the text function text to the clipboard and press CTRL + V to paste the text into your window.

Sometimes, it may press CTRL + V before the window has complete focus. This is especially true for windows that run from a virtual environment, or windows that contain a file that is being loaded from a network location. By default, Keybreeze will wait 250 milliseconds for the window to regain focus before pressing CTRL + V.

If you want Keybreeze to wait more than 250 milliseconds before it pastes the text, use one of the two options below.

 

1. Add a sleep command at the beginning of your text function, similar to the following:

<{sleep=1000}>Keybreeze will pause for 1 second before it pastes this text.

After the equal sign, specify the number of milliseconds you want to wait before Keybreeze pastes the text. This option is only available in version 5.1.1 and higher.

 

2. Modify the wait_time_before_inserting_text setting in the %appdata%\Keybreeze5\options.ini file. By default, this will be set to 250 milliseconds, but you may increase this if you notice that Keybreeze is pasting your text before the window has complete focus. This will apply to ALL text functions. 

Alternatively, you can modify the wait_time_for_modifiers setting in the options.ini file, but this only applies to how long Keybreeze waits after pressing the CTRL key. By default, it waits 50 milliseconds, but you can increase this if necessary.