mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +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
|
||||
"uparrow", "pgup", NULL, "leftarrow",NULL, "rightarrow",NULL, "end", //C8
|
||||
"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
|
||||
#endif // __APPLE__
|
||||
NULL, NULL, NULL, "wake", NULL, "search", "favorites","refresh", //E0
|
||||
"webstop", "webforward","webback", "mycomputer","mail", "mediaselect",NULL, NULL, //E8
|
||||
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':
|
||||
TabbedLast = false;
|
||||
TabbedList = false;
|
||||
#ifdef __APPLE__
|
||||
if (ev->data3 & GKM_META)
|
||||
#else // !__APPLE__
|
||||
if (ev->data3 & GKM_CTRL)
|
||||
#endif // __APPLE__
|
||||
{
|
||||
if (data1 == 'C')
|
||||
{ // copy to clipboard
|
||||
|
|
|
@ -145,12 +145,20 @@ bool CT_Responder (event_t *ev)
|
|||
CT_BackSpace ();
|
||||
return true;
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
else if (ev->data1 == 'C' && (ev->data3 & GKM_META))
|
||||
#else // !__APPLE__
|
||||
else if (ev->data1 == 'C' && (ev->data3 & GKM_CTRL))
|
||||
#endif // __APPLE__
|
||||
{
|
||||
I_PutInClipboard ((char *)ChatQueue);
|
||||
return true;
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
else if (ev->data1 == 'V' && (ev->data3 & GKM_META))
|
||||
#else // !__APPLE__
|
||||
else if (ev->data1 == 'V' && (ev->data3 & GKM_CTRL))
|
||||
#endif // __APPLE__
|
||||
{
|
||||
CT_PasteChat(I_GetFromClipboard(false));
|
||||
}
|
||||
|
|
|
@ -70,7 +70,8 @@ enum GUIKeyModifiers
|
|||
GKM_SHIFT = 1,
|
||||
GKM_CTRL = 2,
|
||||
GKM_ALT = 4,
|
||||
GKM_LBUTTON = 8
|
||||
GKM_META = 8,
|
||||
GKM_LBUTTON = 16
|
||||
};
|
||||
|
||||
// Special codes for some GUI keys, including a few real ASCII codes.
|
||||
|
|
Loading…
Reference in a new issue