mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +00:00
Added support for Command/Meta key
This commit is contained in:
parent
1d02ad3aa2
commit
32af6cb0cf
4 changed files with 18 additions and 1 deletions
|
@ -230,7 +230,11 @@ const char *KeyNames[NUM_KEYS] =
|
||||||
NULL, NULL, NULL, NULL, NULL, "pause", NULL, "home", //C0
|
NULL, NULL, NULL, NULL, NULL, "pause", NULL, "home", //C0
|
||||||
"uparrow", "pgup", NULL, "leftarrow",NULL, "rightarrow",NULL, "end", //C8
|
"uparrow", "pgup", NULL, "leftarrow",NULL, "rightarrow",NULL, "end", //C8
|
||||||
"downarrow","pgdn", "ins", "del", NULL, NULL, NULL, NULL, //D0
|
"downarrow","pgdn", "ins", "del", NULL, NULL, NULL, NULL, //D0
|
||||||
|
#ifdef __APPLE__
|
||||||
|
NULL, NULL, NULL, "command", NULL, "apps", "power", "sleep", //D8
|
||||||
|
#else // !__APPLE__
|
||||||
NULL, NULL, NULL, "lwin", "rwin", "apps", "power", "sleep", //D8
|
NULL, NULL, NULL, "lwin", "rwin", "apps", "power", "sleep", //D8
|
||||||
|
#endif // __APPLE__
|
||||||
NULL, NULL, NULL, "wake", NULL, "search", "favorites","refresh", //E0
|
NULL, NULL, NULL, "wake", NULL, "search", "favorites","refresh", //E0
|
||||||
"webstop", "webforward","webback", "mycomputer","mail", "mediaselect",NULL, NULL, //E8
|
"webstop", "webforward","webback", "mycomputer","mail", "mediaselect",NULL, NULL, //E8
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, //F0
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, //F0
|
||||||
|
|
|
@ -1421,7 +1421,11 @@ static bool C_HandleKey (event_t *ev, BYTE *buffer, int len)
|
||||||
case 'V':
|
case 'V':
|
||||||
TabbedLast = false;
|
TabbedLast = false;
|
||||||
TabbedList = false;
|
TabbedList = false;
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (ev->data3 & GKM_META)
|
||||||
|
#else // !__APPLE__
|
||||||
if (ev->data3 & GKM_CTRL)
|
if (ev->data3 & GKM_CTRL)
|
||||||
|
#endif // __APPLE__
|
||||||
{
|
{
|
||||||
if (data1 == 'C')
|
if (data1 == 'C')
|
||||||
{ // copy to clipboard
|
{ // copy to clipboard
|
||||||
|
|
|
@ -145,12 +145,20 @@ bool CT_Responder (event_t *ev)
|
||||||
CT_BackSpace ();
|
CT_BackSpace ();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#ifdef __APPLE__
|
||||||
|
else if (ev->data1 == 'C' && (ev->data3 & GKM_META))
|
||||||
|
#else // !__APPLE__
|
||||||
else if (ev->data1 == 'C' && (ev->data3 & GKM_CTRL))
|
else if (ev->data1 == 'C' && (ev->data3 & GKM_CTRL))
|
||||||
|
#endif // __APPLE__
|
||||||
{
|
{
|
||||||
I_PutInClipboard ((char *)ChatQueue);
|
I_PutInClipboard ((char *)ChatQueue);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#ifdef __APPLE__
|
||||||
|
else if (ev->data1 == 'V' && (ev->data3 & GKM_META))
|
||||||
|
#else // !__APPLE__
|
||||||
else if (ev->data1 == 'V' && (ev->data3 & GKM_CTRL))
|
else if (ev->data1 == 'V' && (ev->data3 & GKM_CTRL))
|
||||||
|
#endif // __APPLE__
|
||||||
{
|
{
|
||||||
CT_PasteChat(I_GetFromClipboard(false));
|
CT_PasteChat(I_GetFromClipboard(false));
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,8 @@ enum GUIKeyModifiers
|
||||||
GKM_SHIFT = 1,
|
GKM_SHIFT = 1,
|
||||||
GKM_CTRL = 2,
|
GKM_CTRL = 2,
|
||||||
GKM_ALT = 4,
|
GKM_ALT = 4,
|
||||||
GKM_LBUTTON = 8
|
GKM_META = 8,
|
||||||
|
GKM_LBUTTON = 16
|
||||||
};
|
};
|
||||||
|
|
||||||
// Special codes for some GUI keys, including a few real ASCII codes.
|
// Special codes for some GUI keys, including a few real ASCII codes.
|
||||||
|
|
Loading…
Reference in a new issue