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.

2 Likes

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

Any updates on this issue? We’re constantly getting reports of customers trying to login within Pro Tools only to find out each time that the password is pasted twice.

1 Like

We are also getting a bunch of support requests from MacOS & Pro Tools 2020. We decided to implement a workaround for the license key editor component.

It’s strange that I don’t see any mention of this in the Avid forums though

Similar issues reported here by customers - paste through key commands in Pro Tools causes everything to be entered twice. We’ve implemented two workarounds:

  1. allow context menu paste (right click), and
  2. by examining the string, and use the first half of it if it is double the length we expect it to be and the contents of the first half and second half is the same.

Does the job but a fix for the pasting issue would obviously be better :slight_smile:

Same issue here.
Using Pro Tools 2020.9.0, macOS 11.2.3 as well as macOS 10.15.7.

Pasting via the context menu works as expected but pasting via keyboard shortcut duplicates the pasted phrase.
This is not the case for the VST3 and AU versions of the same component.

Since we also restrict user input to a certain length this gets especially confusing because the duplication will only be partly visible in the textbox due to the truncation as extraneous characters.

Just re-built an AAX plugin (Intel-only for now) with the latest Juce master branch (6.0.8) and tested in the latest Pro Tools version (2021.6.0) on latest Big Sur (11.4), and this issue is still present apparently.

@ed95 and @rmajors : is there any news on this either from the Juce team or from Avid?
Who is looking into this?

I can keep telling my users to use the Edit → Paste menu item or right-click and choose paste from my plugin instead of using the standard “paste” keyboard shortcut, but most users expect that to just work as usual of course :wink:

I also noticed that if I use the keyboard shortcut to paste in a value edit field of the “Pro Limiter” that comes with Pro Tools, that works fine. I’m just mentioning this because that edit field looks like a typical Juce edit field with the same purple Juce editing color, so I’m speculating it was also built with some version of Juce. But this is just an assumption, and could be wrong, I really don’t know… But if that assumption is correct, it means that an older version of Juce did not have this issue. Again: all assumptions, I know…

1 Like

Quick heads up:
I just re-built that same AAX plugin (Intel-only for now) with the Juce 6.1.1 tagged master branch and tested in the latest Pro Tools | Ultimate version (2021.7.0) and it looks like this bug is now fixed.
I don’t know exactly if this is because of the changes for Juce 6.1.1 or because of fixes in the latest Pro Tools, but I don’t see this bug any longer: I can copy/paste with the keyboard shortcuts again without getting duplicated text.
Tested on macOS 11.4 (Big Sur).

Might be good if a few other people who had this bug can confirm.

2 Likes