Here's a bit more detail on what I'm trying to do. I'm guessing there's just some sort of fundamental that I'm missing....
This is the example of a button that I'd like to create (within layout.xml)
<button text="Bob" color="yellow" ontap="bobFunction" />
actions.bobFunction = function() kb.stroke("alt", b) end
But I'd really like to do a more generic version of this where I could pass in the key (for example alt-b) that I want to send:
[email protected] k:string this is a key actions.pushKey = function(k) kb.stroke("alt", k) end
Which I'm hoping to call like this (from layout.xml)
<button text="Bob" color="yellow" ontap="pressKey(b)" />
Is it possible to create a somewhat generic handler within remote.lua which could handle a few simple arguments ? Then within layout.xml, I could call the same function (handler) with slightly different arguments ? The arguments would be the key that I would like to send.