User Manual

GETTING STARTED


OTHER EDITIONS


LAUNCHERS


MODULES


PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support

ALL USER MANUAL VERSIONS

Ignition 8.1. Offline Version (04/2021)
Ignition 8 Online Version
Ignition 7.9 Online Version
Ignition 7.8 Online Version

Deprecated Pages

SDK Documentation

Employees

Sign In

Skip to end of metadata
Go to start of metadata


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 action performed event is on many components where an action of some sort may occur. Typically this is triggered when the component is clicked on, or a selection within the component is made. 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
onClick

Fired when a mouse button is pressed and released over the element with the event configured. 

Note that some components, such as buttons, contain properties that disable the component. Clicking a disabled component will still trigger this onClick event. In cases where a script shouldn't run because its parent component is disabled, it is recommended to either use the onActionPerformed event instead (preferred) or have the script check if the component is enabled as part of the script's logic,

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.

Pointer Events

The following feature is new in Ignition version 8.1.15
Click here to check out the other new features
Pointer events will track touch interactions as well as stylus and pen interactions.
Note: Pointer events have only recently become available on all of Perspective's supported browsers. For this reason, these events may not be available in older versions of Safari and Firefox. If pointer events do not fire as expected, we recommend upgrading your browser to the most current version.

EventDescription
onPointerDownFired when a pointer is pressed (not necessarily released) over the element.
onPointerMoveFired continuously while the pointer moves over the element.
onPointerUpFired when a pointer is released (not necessarily pressed) over the element.
onPointerCancelFired when a pointer 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.
onPointerOverFired when the pointer is moved onto the element.
onPointerOutFired when the pointer is moved off the element.
onPointerEnterFired when the pointer is moved onto the element.
onPointerLeaveFired when the pointer is moved off the element.

Pointer Event Properties

Property NameDescription
heightThe height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.
isPrimary

Indicates if the pointer represents the primary pointer of this pointer type.

pointerIdA unique identifier for the pointer causing the event.
pointerTypeIndicates the device type that caused the event (mouse, pen, touch, etc).
pressureThe normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.
tangentialPressureThe normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress) in the range -1 to 1, where 0 is the neutral position of the control.
tiltXThe plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane container both the pointer (e.g. pen stylus) axis and the Y axis.
tiltYThe plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the pointer (e.g. pen stylus) axis and the X axis.
twist

The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0  to 359.

widthThe width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

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.
repeat Is 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


Text 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 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.
onTouchMove Fired 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