Pasting text from system clipboard via key shortcut | Pro Tools 2020 | AAX | macOS 10.15

Hi folks,
does anyone ran into the same mysterious issue? Text from the system clipboard will added twice via key shortcut into a simple juce::TextEditor. Doing the same through the editors context menu is working as expected.

Having build AAX with the JUCE latest 5 and 6 doesn’t make a difference.

I have noticed the opposite issue, where in some host/OS combinations, the keyboard shortcuts cannot seem to achieve focus within the TextEditor, and so pasting via shortcuts does not work at all… however the context menu always works to successfully paste the text.

I think I will try to repro what you’ve found as it is a fairly new environment, since it might provide clues to my issue (I would really like it if every host/OS combination could use Ctrl/Cmd+V to paste into TextEditor successfully…)

Exactly the same issue here!

What I found out is that pasting via Edit->Paste only leads to pasting once but using CMD+V leads to pasting it twice. I see Edit flashing when pressing CMD+V, so I assumed that this is some kind of key event that gets consumed twice? I gave up debugging at some point…

We also receive reports from PT 2020 users that have problems with CMD + V.

Same issue here. User with PT on OSX 10.14.6. Any fixes that we can use?

Stepping through the debugger after hitting CMD+V on a JUCE TextEditor, I can see that the plug-in first receives a standard NSResponder paste: call from the invoked menu item but then this is immediately followed by a call to NSResponder keyDown: with the CMD+V keys associated with this menu item causing the text to be pasted twice. Older versions of Pro Tools (tested with a 2019.11.0 build) only invoke the paste: selector and we do not receive the subsequent keyDown: call, so this seems like an unintentional change in behaviour in the most recent Pro Tools.

Perhaps @rmajors can chime in?

Just as an update to this:

To confirm that the behaviour has definitely changed in Pro Tools I’ve taken one of the AAX example plug-ins and added a standard Cocoa NSTextField with a swizzled NSTextView which listens for paste and keyDown events. I can see that in Pro Tools 2020.9 the same behaviour is happening as in JUCE plug-ins - that is, a paste event immediately followed by a keyDown event with CMD+V, whereas is 2019.11.0 only a paste event is sent. This doesn’t cause a double-paste with NSTextField, but does play the modal “beep” indicating that something is amiss (this doesn’t happen in the 2019 build).

3 Likes

Nothing new here, but just to confirm: I’m getting reports from Pro Tools users too (typically saying they can’t activate their plugin, and that’s because they (understandably) paste the serial number, which then gets pasted twice etc…).

So, for now, I tell my users to not use the keyboard shortcut to paste text in my plugin, but use one of these solutions (well, workarounds):

  • paste the text using the context menu (mouse right-click -> Paste)
  • paste the text using the Pro Tools menu bar: Edit -> Paste

And yes, this seems to be something specific to the interaction between Pro Tools and JUCE-based AAX plugins, as the keyboard shortcut works fine with the same GUI controls in the AU or VST2 version in various other hosts (Cubase, Live, …)

Edit: The version I used to reproduce this is Pro Tools 2020.9.1 on macOS Catalina.

1 Like

And I can reproduce it in PT 2020.11 on macOS Sierra.

We’re facing the same problem as you that some of customers are trying to paste the license key and don’t notice that it’s pasted twice.

Seeing as this might not be imminently fixed in Juce, I’m considering adding some code that either completely ignores characters beyond the length of a license key, or that looks for double pasted keys explicitly.

1 Like