How to use the "Type" command with FunctionKeys
Posted: Sun Jun 23, 2024 10:45 pm
Good morning.
I would like to use the Type command, not to simulate a keyboard press of "A" or else, but of a function key, like "F1" or "F2".
The F1 key returns on my Mac keyboard, on RawKeyDown, 65470.
I tested
but then, trying to intercept it in RawkeyDown it doesn't work (I get a bunch of numbers).
Also using on functionKey theKey, does not works.
So, the all idea is use Type to simulate the F1 key press and be able to detect, on my script, if this F1 key has been pressed.
Thanks for any help.
I would like to use the Type command, not to simulate a keyboard press of "A" or else, but of a function key, like "F1" or "F2".
The F1 key returns on my Mac keyboard, on RawKeyDown, 65470.
I tested
Code: Select all
Type numToCodepoint(65470)
or
Type numToNativeChar(65470)
Also using on functionKey theKey, does not works.
So, the all idea is use Type to simulate the F1 key press and be able to detect, on my script, if this F1 key has been pressed.
Thanks for any help.