Closed aaronventure closed 6 months ago
Yeah, you need to return true
in the callback or otherwise it will be executed many times.
However this is super annoying, another user ran into the same problem a few months ago plus I had to debug the issue just to find out that it's a usage error and not a bug in HISE, so I've changed the way it works to be less opaque going forward.
So you need to call an additional function setConsumedKeyPresses()
which "pre filters" whether the callback should be executed and returns true
or false
automatically based on the provided key press list.
I've updated the docs to reflect this too:
Nice one. Do you think tagging the commit as breaking would be a good idea?
Thought about that, but I've just throw a script error that will complain if you use setKeyPress()
without calling the other method before, so this should be a hint enough for the changed behaviour.
Also it's not a hard breaking change that requires you to actually change something, just add another function call for each key press you assign.
a46275bfd90aa394c830d676d7ba3c218f60a5d6
macOS 14.4.1