CTextEdit Copy and Paste Keyboard shortcut not working macOS VSTGUI 4.9

Seems to be working fine in Windows, but for some reason it’s not on macOS. Right-clicking to copy and past works as expected. Anyone else seeing this issue?

Which host are you testing with?


class Editor : public PluginGUIEditor, public IControlListener

Seems like if I try to access the clipboard directly in onKeyDown, using the following code, my buffer contains garbage–mostly zeros, although the type is correctly set to kText. In Windows when doing control-v, onKeyDown isn’t called.

auto clipBoard = getFrame()->getClipboard();
int len = clipBoard->getDataSize(0);
char data[2000];
const void* buffer = &data;
VSTGUI::IDataPackage::Type type;
clipBoard->getData(0, buffer, type);
if (type == VSTGUI::IDataPackage::kText) {
     // do stuff here

Key commands for platform controls need host support on macOS. You need a top level menu in the menubar with the copy/paste items doing the default things, namely set up to call the copy: or paste: selector.

Thanks. I’ll give that a try.