Client event keystroke script - key release ok but not key press?

Ignition 7.9.5 - windows 10 - Java 8
On a single monitor vision client, I have added the following client event script keystroke :

LEFT (Pressed)
import system
print "pressed"
LEFT (Released)
import system
print "released"

On the vision client, I clikc to the windows to set the focus,
when I press LEFT arrow => no logs in diagnostics client windows => why ? seems to be a bug ?
when I release LEFT arrow => logs “released” in diagnostics client windows.

When I reopen the LEFT client script to edit, Key F1 with Action Pressed is always displayed => why ???

Does any body use LEFT/RIGHT/UP/DOWN / + / - key event press and released with success ?

Hmm… it’s working fine for me on OS X.


Hi there,

I ran the same test on Windows 10, and while I am not having any trouble with the pressed action firing my script, I was able to replicate the behavior where you open the event script back up for testing, and the default of “F1” is selected in the dropdown, rather than the LEFT action. As long as I don’t apply that change, my scripts still work as expected. I wonder if you accidentally saved the changes after finding the “F1” bug. If you try pressing F1 while the vision window has focus, do your see your original “pressed” print statement?

I’ll file a bug report for the dropdown selection in the client event scripts editor. Thank you for bringing this to our attention!

Hi @acooper,

I have recreated the script event for LEFT key, I never see the “pressed” action, only the released action is triggered.
F1 has no effect

Sorry for digging up an old thread, but I’m having a similar issue.
I have Keystroke scripts on the Left and Right arrows for both Pressed and Released.
My Left arrow key pressed script looks like this:

print "setting offest subtract to TRUE"
result = system.tag.write('Midcon/HMI_Choke_Offset_Subtract', True)

The released script looks like this:

print "setting offest subtract to FALSE"
result = system.tag.write('Midcon/HMI_Choke_Offset_Subtract', False)

When pressed and released the only thing written to the Diagnostic Console is:
“setting offest subtract to FALSE”
Also the tag never gets set.

Has there been any follow up on this issue?

I’m running v7.9.12 in a Windows Server 2012 R2 machine.


I have a simple code which checks for a popup window and if its open then a script written in Action performed property of a button will be executed
the trigger is Left key . the code looks like this.

windows = system.gui.getOpenedWindowNames() # get list of all open windows
if “Popups/205_PopupHookupUnhookup” in windows: # check if hookupunhookup is open
main = system.gui.getWindow(“Popups/205_PopupHookupUnhookup”)
button = main.getRootContainer().getComponent(“Left_Button”) # if Yes, the point to root container of Window and the Left Button component
button.doClick() #This will trigger code written in “actionPerformed” property of Left Button
print windows

the Key pressed option doesn’t work with LEFT key, only released is working, is that a bug ?
I am using ignition version 8.1.9

Key press versus release events do vary by operating system. I recommend not relying on them.