You're currently browsing the Ignition 8.0 docs. Click here to view the latest docs.


Perspective Events provide the opportunity to handle any type of user input or session event as you see fit. To this end, Perspective exposes dozens of configurable events in the Configure Events... dialog. The goal of this page is to explain what circumstances trigger each event.

If you choose to associate a given event with a script action, you will be provided with an event parameter in your script.  List the properties of that event parameter, which differs for each broad class of event.

Component Events

Component Events serve the same purpose as Vision extension functions, and are visible and configurable only on components for which they are applicable. The following components have component events:


Refer to the respective component pages for descriptions of component events.

Action Performed Event

The following feature is new in Ignition version 8.0.2
Click here to check out the other new features
The action performed event is on many components where an action of some sort may occur. While the action may differ between components, the event functions in the same way.

Applicable components:

  • Date Time Input
  • Date Time Picker
  • Barcode Scanner Input
  • Button
  • Checkbox
  • Dropdown
  • Multi-State Button
  • Numeric Entry Field
  • One-Shot Button
  • Radio Group
  • Slider
  • Toggle Switch
Event NameDescription
onActionPerformedFired when the action of the component is done, such as the button being pressed, or a checkbox being checked.

On this page ...


System Events

System Events are events that are not related to any specific user input, but to status changes of the component or view.

Event NameReact EventDescription
onStartupcomponentDidMount
  • Fired on a component when the component's view is loaded into the browser window.
  • Fired on a view when the view is loaded into the browser window.
onShutdowncomponentWillUnmount
  • Fired on a component when the component's view is removed from the browser window (or when the session closes due to logout or timeout)
  • Fired on a view when the view is removed from the browser window (or when the session closes due to logout or timeout)

Selection Event Properties

There are no special properties associated with a selection event.


Mouse Events

Event NameDescription
onClickFired when a mouse button is pressed and released over the element with the event configured.
onContextMenuFired when the right mouse button is pressed and released over the element.
onDoubleClickFired when a mouse button is pressed and released twice over the element.
onMouseDownFired when a mouse button is pressed (not necessarily released) over the element.
onMouseEnterFired when the mouse pointer is moved onto the element.
onMouseLeaveFired when the mouse pointer is moved off the element.
onMouseMoveFired continuously while the mouse moves over the element.
onMouseOutFired when the mouse pointer is moved off the element.
onMouseOverFired when the mouse pointer is moved onto the element.
onMouseUpFired when a mouse button is released (not necessarily pressed) over the element.

Mouse Event Properties

Property NameDescription
altKeyIs true if the Alt key is pressed when the event is fired, and false otherwise.
button

Indicates which mouse button was used to perform the click event. Possible options are:

  • 0 - Main button (usually the left mouse button)
  • 1 - Auxiliary button (usually the wheel button or middle mouse button)
  • 2 - Secondary button (usually the right mouse button)
  • 3 - Fourth button (usually the Browser Back button)
  • 4 - Fifth button (usually the Browser Forward button)
buttons

For handling situations where multiple mouse buttons are pressed when the event is fired, buttons holds an integer sum, where each button is given the following values:

  • 1 - Main button
  • 2 - Secondary button
  • 4 - Auxiliary button
  • 8 - Fourth button
  • 16 - Fifth button

This, if the main and fourth buttons are pressed simultaneously, the buttons value will be 1 + 8 = 9.

clientXIndicates the horizontal coordinate of the mouse click relative to the edge of the session.
clientYIndicates the vertical coordinate of the mouse click relative to the edge of the session.
ctrlKeyIs true if the Ctrl key is pressed when the event is fired, and false otherwise.
getModifierState(key)Returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.
metaKeyIs true if the meta key (like the Windows key in Windows) is pressed when the event is fired, and false otherwise.
pageXSame as clientX, except horizontal scrolling is taken into account. If some of the session is hidden on the left side, pageX will be larger than clientX.
pageYSame as clientY, except vertical scrolling is taken into account. If some of the session is hidden above, pageY will be larger than clientY.
relatedTargetA  read-only property that is the secondary target for the mouse event, if there is one. For events with no secondary target, relatedTarget returns null.
screenXProvides the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates.
screenYProvides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.
shiftKeyIs true if the Shift key is pressed when the event is fired, and false otherwise.


Keyboard Events

Event NameDescription
onKeyDownFired whenever any key is pressed while the element is focused.
onKeyPress

Fired continuously while any key (other than Shift, Fn, and CapsLock) is in a pressed position and the element is focused.

This event isn't recommend. Use onKeyDown instead. MDN keypress event

onKeyUpFired whenever any key is released while the element is focused.

Keyboard Event Properties

Property NameDescription
altKeyIs true if the Alt key is pressed when the event is fired; false otherwise.
charCode

Read-only property that returns the Unicode value of a character key pressed during a keypress event.

Deprecated. Use the key property instead: MDN charCode

ctrlKeyIs true if the Ctrl key is pressed when the event is fired; false otherwise.
getModifierState(key)Returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked); false otherwise.
keyRead-only property that returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as Shift as well as the keyboard locale and layout.
keyCode

Read-only property resenting a system and implementation dependent numerical code, identify the unmodified value of the pressed key. 

Deprecated: MDN keyCode

locationRead-only property that returns a value representing the location of the key on the keyboard or other input device.
metaKeyIs true if the meta key (like the Windows key in Windows) is pressed when the event is fired; false otherwise.
repeatIs true  if the given key is being held down such that it is automatically repeating.
shiftKeyIs true if the Shift key is pressed when the event is fired; false otherwise.
which

Read-only property that returns the numeric keyCode of the key pressed, or the character code (charCode) for an alphanumeric key pressed.

Deprecated: MDN which


Composition Events

The following events are triggered via composition - meaning cases where supplementary or alternative means are used to input text. For example, building logograms from base characters, or when voice commands are converted into text via speech recognition. 

Event NameDescription
onCompositionEndTriggers when composition ends on an input component. 
onCompositionStartTriggers when composition begins on an input component.
onCompositionUpdateTriggers when a new character is received while composing text on an input component. 

Selection Event Properties

There are no special properties associated with a selection event.


Focus Events

Event NameDescription
onFocusFired whenever the element is focused. Usually, a component or container becomes focused when the user starts to interact with it.
onBlurFired when the element loses focus. This usually happens when the user focuses something else.

Selection Event Properties

There are no special properties associated with a selection event.


Selection Events

Event NameDescription
onSelectFired after a section of text is selected in the element.

Selection Event Properties

There are no special properties associated with a selection event.


Touch Events

Event NameDescription
onTouchCancelFired when a touch point has been disrupted, such as when a touch manipulation (i.e., panning or zooming) is initiated or more touch points are added to the surface than the device is capable of registering.  
onTouchEndFired when the user removes a touch point from the touch surface, including cases where the touch point physically leaves the touch surface, such as being dragged off of the screen.
onTouchMoveFired when a touch point has moved along the touch surface.
onTouchStartFired when the user has touched the surface of a touch capable device.  

Touch Event Properties

Property NameDescription
altKeyIs true if the Alt key is pressed when the event is fired; false otherwise.
ctrlKeyIs true if the Ctrl key is pressed when the event is fired, and false otherwise.
metaKeyIs true if the meta key (like the Windows key in Windows) is pressed when the event is fired; false otherwise.
shiftKeyIs true if the Shift key is pressed when the event is fired; false otherwise.


Wheel Events

Event NameDescription
onWheelFired whenever the mouse's scroll wheel is used over the element.

Wheel Event Properties

Property NameDescription

deltaMode

Indicates the unit associated with the other three properties. Possible values are:

  • 0 - The other properties specify the wheel movement in pixels.
  • 1 - The other properties specify the wheel movement in lines.
  • 2 - The other properties specify the wheel movement in pages.

deltaX

Indicates the length of a horizontal scroll. Most mouse devices do not possess horizontal scrolling capability. Scrolling right will return a positive value, and scrolling left will return a negative value.
deltaYIndicates the length of a vertical scroll. This is by far the most common type of scroll; it coincides with the upward and downward movement of a typical mouse scroll wheel. deltaY will be positive when scrolling down, and negative when scrolling up.
deltaZIndicates the length of a depth scroll. Not many mouse devices deliver this kind of scroll; typically only a "3D" mouse would control this scroll type. The value is positive when scrolling in, and negative when scrolling out.




  • No labels