Skip to content

Commit 3944e84

Browse files
committed
VNCConn: on Mac, send Ctrl as Ctrl and Command as Super
Before, we'd send Ctrl as Nothing and Command as Ctrl. This now makes Ctrl really behave as Ctrl and the user gain a way to send Super (aka Windows key). Closes #289
1 parent 4a89ed0 commit 3944e84

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/VNCConn.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1633,8 +1633,13 @@ bool VNCConn::sendKeyEvent(wxKeyEvent &event, bool down, bool isChar)
16331633
//case WXK_RSHIFT: kev.keysym = XK_Shift_R; break;
16341634
case WXK_SHIFT: kev.keysym = XK_Shift_L; break;
16351635
//case WXK_RCTRL: kev.keysym = XK_Control_R; break;
1636+
#if defined __APPLE__
1637+
case WXK_RAW_CONTROL: kev.keysym = XK_Control_L; break; // Mac Ctrl Key
1638+
case WXK_CONTROL: kev.keysym = XK_Super_L; break; // Mac Command Key
1639+
#else
16361640
case WXK_CONTROL: kev.keysym = XK_Control_L; break;
1637-
// case WXK_RALT: kev.keysym = XK_Alt_R; break;
1641+
#endif
1642+
// case WXK_RALT: kev.keysym = XK_Alt_R; break;
16381643
case WXK_ALT: kev.keysym = XK_Alt_L; break;
16391644
// case WXK_RMETA: kev.keysym = XK_Meta_R; break;
16401645
// case WXK_META: kev.keysym = XK_Meta_L; break;

0 commit comments

Comments
 (0)