mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 03:55:19 -04:00
Ignore key character text input on 64 bit mac backend while Cmd is pressed, fixes 'c' and 'v' appearing in chat when copy/pasting. (Thanks Ally)
This commit is contained in:
parent
730eadf47b
commit
6b4342d2c5
@ -2829,7 +2829,13 @@ static void ProcessKeyChars(id ev) {
|
|||||||
const char* src;
|
const char* src;
|
||||||
String str;
|
String str;
|
||||||
id chars;
|
id chars;
|
||||||
int i, len;
|
int i, len, flags;
|
||||||
|
|
||||||
|
/* Ignore text input while cmd is held down */
|
||||||
|
/* e.g. so Cmd + V to paste doesn't leave behind 'v' */
|
||||||
|
flags = (int)objc_msgSend(ev, selModifiers);
|
||||||
|
if (flags & 0x000008) return;
|
||||||
|
if (flags & 0x000010) return;
|
||||||
|
|
||||||
chars = objc_msgSend(ev, selCharacters);
|
chars = objc_msgSend(ev, selCharacters);
|
||||||
src = objc_msgSend(chars, selUtf8String);
|
src = objc_msgSend(chars, selUtf8String);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user