Paste on OSX
When using the Mac client, you can copy with: CTRL + OPT + C Paste does not work with any combination of keys + V
Can you create hotkeys using OPT key at all? I have no way to test Mac client unfortunately.
This problem also occurs on the linux version, paste does not always work.
Can you create hotkeys using OPT key at all? I have no way to test Mac client unfortunately.
no, the client does not detect the opt key. Although it detects ctrl, and it is assignable to hotkeys, ctrl+v does not work, it just inputs v.
Can you create hotkeys using OPT key at all? I have no way to test Mac client unfortunately.
no, the client does not detect the opt key. Although it detects ctrl, and it is assignable to hotkeys, ctrl+v does not work, it just inputs v.
Check this code
std::string X11Window::getClipboardText()
{
Atom clipboard = XInternAtom(m_display, "CLIPBOARD", False);
Window ownerWindow = XGetSelectionOwner(m_display, clipboard);
if(ownerWindow == m_window)
return m_clipboardText;
std::string clipboardText;
if(ownerWindow != None) {
Atom propertyAtom = XInternAtom(m_display, "OTCLIENT_CLIPBOARD", False);
Atom target = XInternAtom(m_display, "UTF8_STRING", False);
if(target == None)
target = XA_STRING;
XConvertSelection(m_display, clipboard, target, propertyAtom, m_window, CurrentTime);
XFlush(m_display);
// hack to wait SelectioNotify event, otherwise we will get wrong clipboard pastes
// TODO: fix this in a correct way
stdext::millisleep(100);
Atom type;
int format;
unsigned long len = 0, bytesLeft = 0;
unsigned char* data = nullptr;
int result = XGetWindowProperty(m_display, m_window, propertyAtom, 0, 10000000L, False, target, &type, &format, &len, &bytesLeft, &data);
if(result != Success || len == 0 || data == nullptr) {
if(data)
XFree(data);
target = XA_STRING;
XConvertSelection(m_display, clipboard, target, propertyAtom, m_window, CurrentTime);
XFlush(m_display);
stdext::millisleep(100);
result = XGetWindowProperty(m_display, m_window, propertyAtom, 0, 10000000L, False, target, &type, &format, &len, &bytesLeft, &data);
}
if(result == Success && len > 0 && data) {
clipboardText.assign(reinterpret_cast<char*>(data), len);
if(stdext::is_valid_utf8(clipboardText))
clipboardText = stdext::utf8_to_latin1(clipboardText);
XFree(data);
}
}
return clipboardText;
}
To whoever fixes this, keep in mind that Mac users are used to anything CTRL being mapped to CMD(windows key).
So the proper shortcut for copy/paste is CMD+C and CMD+V