Pangolin Wiki

Laser Show Control for Lighting Professionals

User Tools

Site Tools


beyond:keyboard_to_pangoscript

Keyboard to PangoScript

BEYOND offer a few new ways for you to assign PangoScrtipts to a key on keyboard. We will discuss how to set this up, and the functionality of each feature, below.

First way - The list in the PangoScrtipt tab has a context menu, and inside it, is says “Set Hotkey”. When the Hotkey is assigned, click on it, and it will do the following:

  • If the script is active then it will pulse a hot key event. There is a command called “WaitForHotKey” that you can use. If your script uses this, and it is in a waiting state, then the hotkey will continue it’s execution of the script. Otherwise it has no action.
  • If the script is not active then BEYOND will start to execute it.

Second way - some scripts will have the “OnKeyDown” label. But this is pure pangos-scripting, lets skip it here.

Third way - Keyboard to PangoScrtipt table

The Keyboard has 256 key-codes plus Ctrl, Alt, and Shift modifiers. You can assign a PangoScript to any key with a combination of modifiers. Internally BEYOND keeps all script information inside an array where the table index is a key-code.

Please note, BEYOND uses some rules for script execution processing as there are short scripts, like one command or so which are “easy” to execute, and then there are scripts with Sleep() or WaitFor commands which cannot be executed inside one instruction cycle. Any Wait operation means that BEYOND will stop execution of the script and will complete the execution later. During this time where the script is not being executed, it is possible that a User will click the Key a second time.

BEYOND uses the following rules for Keyboard to PangoScript table script execution:

  1. If the script (scripter) of the key is not active, then BEYOND will create a scripter, and start to execute the code immediately, onside OnKeyDown of BEYOND. If the script is long or any of WaitFor or Sleep instructions are detected then BEYOND will stop execution of the script. The script will be activated later, during the next loop of the BEYOND Script thread. If the script execution fits into one loop, then BEYOND will terminate the scripter after it is finished when it is optimal from a resource standpoint.
  2. If the script (scripter) of the key is active, then BEYOND will update the script parameters to show the script is not in a waiting state, and BEYOND will restart it. Restart means – go to 1st line and resume execution.

Parameter Supplied into the Script

There are functions ExtValue and Param(). Before the start of a script execution, BEYOND will set

  • Param(1) – 1 is “key down” and 0 if “key up”
  • Param(2) – key code
  • ExtValue – equal to Param(1), 1 is “key down” and 0 if “key up”

Keyboard to PangoScript Settings

The left side of this interface will display key codes, and the right side shows the corresponding PangoScript. For quick navigation in the list, enter the key into the edit-box located at the bottom of the list. Double click on list to open the PangoScript editor. BEYOND will save the settings into a file automatically in the System folder. There is no need to save the file, just click OK.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
beyond/keyboard_to_pangoscript.txt · Last modified: 2019/08/02 13:10 by Bob Varkevisser