Also requires a release for all those as well… and I’m not sure you can send multiple characters (as opposed to modifiers) in a single call like that, but I’d have to double check… but that wasn’t what I meant by more complex handler.
Your example handles a single unicode character, I’m currently doing 8 (soon to be more) pages/layers of 15 macros (120 effective buttons), and not all of those are single characters. so I’m going to need to either parse each character in each button entry of each page/layer, with a lookup, or write a more complex container for each button. and of course each of those unicode characters has to be looked up and written out in the correct format.
enabling windows unicode hex entry, I think I can get away with this slightly less clunky construct
keyboard.press( Keycode.ALT, Keycode.KEYPAD_PLUS )
layout.write( "221D" )
keyboard.release_all()
and if so, I’ll probably take a combination approach, parsing each button entry element depending on whether it’s array or text and, encode each button entry as something like
{"ascii ",{MODIFIER_FLAG, UNICODE_POINT}, " more ascii" }
not quite user friendly, so I doubt it’ll get much use when I share it, but barring anyone being aware of other alternatives it looks like that’s what I’ll need to do. I’ll leave this here for a week or two and if no better alternative is posted I’ll flag yours as the solution with my thanks for your assistance.
ETA:
Re: “anything a keyboard can do”, for clipboard access I was more thinking of USB functions outside of the HID library… but I wrote that poorly. Sometimes my brain skips a few steps ahead of my writing, mea culpa.
I was more wondering if (given that keybow presents as an HID device) if some other presentation had direct write access to the clipboard, and if it could be shoehorned in. My understanding is “no”, but hardware coding is a new hobby for me, so I’m not aware of all the options/limitations.