I’m interested in having keys (for (), {}, [] and <>) which do the open version on keypress and the closed version on release, so that on typing as you hold it, anything typed in between is enclosed, as if it were a kind of modifier. Anyone tried anything along these lines?
So to be completely clear, HoldButton I want this to be in parentheses ReleaseButton should result in (I want this to be in parentheses)
Something along these lines, as a starting point? Wrap it in plugin boilerplate, spice it up with support for the other brackets, and you should be good to go.
Mind you, it’s completely untested code, and it’s 3am, so I take no responsibility if it starts mining bitcoin by accident.
While I haven’t had time to do this anyway, I do plan to do a much simpler macro in addition, probably on a different layer by same position as the keys which are being referenced, which puts (),{},[] or <> around highlighted text (i.e. ctrl-x,openThing,ctrl-v,closeThing, with some sensible delay). Happy to share the code but I imagine almost everyone here can figure this out themselves.