Velocity API: WLEvent.buildOnKey()

Version 2

    Return To Index

    WLEvent.buildOnKey()

    Overview

    Create a string to represent the event name for a specified key code.

    Use case

    • Used by scripts to generate named events for specific key presses.

    Format

     

    WLEvent.buildOnKey(keyCode);
    ParameterDescriptionTypeRequiredNotes
    keyCodeThe key code to use.StringRequiredFour-digit values for standard hex codes required. For example:
    '0001'
    '0002'
    '0003'

     

    Example

    /* This is a hard-coded example of the WLEvent.buildOnKey 
    * script. The following value is returned as a keycode event
    * in the OnKey<HHHH> format.
    */
      
    var keyEvent = WLEvent.buildOnKey('0001'); /* 'OnKey<0001>' */