It’s not reserved by anything in your project specifically, it’s reserved by Ignition itself. F10 is already in use in clients. Can you add a modifier?
You will have to use a client startup script and manipulate the ActionMap and InputMap in the client yourself if you want to “override” the F10 behavior.
The client (and designer) are built in Jython, a Java-based implementation of Python. This means you can access the Java-based GUI of the client. Doing this, you have more (unsupported by IA) control over the client and how it reacts. See this page for more information on input/action maps and how to work with them.
I explored this input map stuff, you can take a look here. In this example, it prints out a lot of stuff and then when it finds the entry in an inputmap that is just for pressing F10, it removes it. What you’d want to do is add an action to that component’s action map, and add that action’s key to the input map for F10 (where in my script, I just have a blank string). Hope this helps.
from javax.swing import SwingUtilities as su
from javax.swing import JComponent
ancWin = su.getWindowAncestor(self).getComponent(0)
inMap = ancWin.getInputMap()
consts = [ ['ancestor of focused', JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT],
['whenfocused', JComponent.WHEN_FOCUSED],
['when in focused window', JComponent.WHEN_IN_FOCUSED_WINDOW]
]
def recMap(c, i = 0):
selfMap = {}
try:
for x in consts:
selfMap[x[0]] = c.getInputMap(x[1])
except:
selfMap = None
for k, v in selfMap.items():
if v != None:
if v.allKeys() is not None:
print c
print ' %s:' % k
for imk in v.allKeys():
print ' %s: %s' % (imk, v.get(imk))
if str(imk) == 'pressed F10':
v.put(imk, "") ####Here, replace the blank quotes with the key to a new entry in component c's actionmap
try:
if i < 5: #prevent too much recursion
for c in c.getComponents():
recMap(c, i + 1)
except:
pass
recMap(ancWin)
Edit: I put this on a button for testing purposes. but I think you might put it in one of your ‘open on startup’ visionWindowOpened scripts.
Depending on where you’re running it, that ‘self’ may need to change. All it really needs to be is some kind of component in an open window. If this is to be run every time the client is opened, I’d suggest putting this on the visionWindowOpened function on one of the windows you have set to open on startup.