Looks like a very interesting device!
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: