Unless it’s a bug in my own code ofc. But I was told there were some recent hacks around other keyboard focus aspects so I guess it could be a JUCE bug. Anyway if anyone runs into the same issue, here’s my hack around the hack:
In the class that should have a keyPressed method I have an object of this:
I’m seeing a similar thing specifically in Bitwig, where pasting from clipboard with ctrl+v into a juce::TextEditor pastes the content from the clipboard into the editor twice, doesn’t happen in other hosts, and doesn’t happen if I paste using the context menu, figured it may be related?
IIRC a similar behavior was reported also about Pro Tools, I don’t know if it was ever resolved and on which side (meaning whether Pro Tools was fixed to behave correctly, or JUCE worked around it specifically for Pro Tools)
Sure you’re not getting two messages - one for keyDown and one for keyUp - and are forgetting to check the state somewhere? Its quite useful to get a separate message for a key UP event … for the case where QWERTY is being used as a Piano keyboard, for example …
We are getting the same problem in FL Studio. Ctrl-V into a text editor pastes the text twice.
Studio One is fine though.
EDIT: In our case it seems to be a bug introduced in JUCE 7.0.6. Because when I build using JUCE 7.0.5 Ctrl-V is fine. But since JUCE 7.0.6 we get the text pasted twice in FL Studio.
When filing bug reports, please include instructions to reproduce the problem so that we can determine whether there is really a defect. From the description, it’s not clear under what circumstances you’re seeing duplicate keypresses.
We recently pushed a fix for an issue with a similar description. Please try updating and check whether the problem is resolved. If it is not resolved, please provide instructions and example code to reproduce the problem.