Just reporting in to say a huge "thanks" for this features which, with a little tinkering, has brought back my beloved XKeys80 back from oblivion! No other keypad/keyboard combination has quite fitted my workflow so well, and I've done without it since OSX something killed ControllerMate.
I have all the keys successfully mapped for key presses - can I get a consult on the best way to tackle function keys, which need to have press and release mapped? Should I use BTT variables to store which keys are currently down and, if so, can I get/set them from the GD script? Or can I get the system report about which keys are currently down?
Can you give some more information about the F keys? Are their changes shown in the GD script?
You can use btt variables - to retrieve them you can use something like this:
let value = await callBTT('get_string_variable',{variableName:'theVariableName'})
However this is relatively slow. If you just need to store information, you can create a global variable before the analyzeDeviceInput function. Have a look here:
I've not explained myself very well - all of the keys are of the same type, but what I want to do is to map some to Ctrl/Option/Shift/Cmd. So I need them to be "held down" and not momentary, and need the key-down and key-up to be captured.
The solution by Back-To-Topic has proved a winner - I have adapted it for the Xkeys and all working perfectly - thanks both!