<font color=red>This plug-in has been removed. It is no longer necessary, due to the addition of key code functionality to the built-in keyboard plug-in.
If you require a copy of the plug-in to be able to open a project, PM me. Otherwise, please use the built-in keyboard plug-in.</font>
<font size="4">Plug-in: KeyCode</font>
Capture key from keyboard and return hardware scan code, Unicode code, and Unicode character.
Installation
- Extract the contents of the zip file into \Construct2\exporters\html5\plugins
- Folder name: wastrel_keycode
Features
- Capture the hardware scan code and the Unicode code/character for a key from the keyboard
Usage
<font face="Courier New, Courier, mono">- <font color=red>(DEPRECATED) KeyCode -> Capture key : System -> Set value {variable} = KeyCode.Code</font>
- KeyCode -> Capture key : System -> Set value {variable} = KeyCode.ScanCode
- KeyCode -> Capture key : System -> Set value {variable} = KeyCode.UnicodeCode
- KeyCode -> Capture key : System -> Set value {variable} = KeyCode.UnicodeChar
- {Some/empty condition} : Start capture
- {Some/empty condition} : End capture</font>
Conditions
- Capture key: Captures the next keystroke from the keyboard and places the hardware scan code into the ScanCode expression; the Unicode code into the UnicodeCode expression; and the Unicode character into the UnicodeChar expression. Use System -> Set value to set a variable to the key code value. The Capture key condition is enabled using the Start capture action, and is disabled with the End capture action.
Actions
- Start capture: Enables the Capture key condition to capture the next keystroke. Capture key will continue to capture keystrokes until End capture is called. Generally, Start capture will be called with a specific condition (e.g button press) to capture one keystroke (e.g. to set key mappings). Start capture can also be called using an event with an empty condition, for continuous key captures.
- End capture: Disables the Capture key condition.
Expressions
- <font color=red>(DEPRECATED) Code: An integer value which contains the key scan code, set by the Capture key condition. Default = 0.</font>
- ScanCode: An integer value which contains the key scan code, set by the Capture key condition. Default = 0.
- UnicodeCode: An integer value which contains the Unicode code, set by the Capture key condition. Default = 0.
- UnicodeChar: A string value which contains the Unicode character, set by the Capture key condition.
Examples