Commit fca48f5a authored by teella's avatar teella

added peroid work around for OSX reported by Ori Hanegby


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1283 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 09e767a9
...@@ -500,17 +500,24 @@ void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed ...@@ -500,17 +500,24 @@ void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed
if (iter != _keycodes.end()) mkey = (*iter).second; if (iter != _keycodes.end()) mkey = (*iter).second;
else else
{ {
cStr = (unsigned char *)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; // workaround for period character
if (cStr != NULL && strlen((char*)cStr) > 0) if (c == 0x2E)
{ {
mchar = cStr[0]; mkey = irr::KEY_PERIOD;
mkey = toupper(mchar); mchar = '.';
if ([(NSEvent *)event modifierFlags] & NSCommandKeyMask) } else {
cStr = (unsigned char *)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];
if (cStr != NULL && strlen((char*)cStr) > 0)
{ {
if (mkey == 'C' || mkey == 'V' || mkey == 'X') mchar = cStr[0];
mkey = toupper(mchar);
if ([(NSEvent *)event modifierFlags] & NSCommandKeyMask)
{ {
mchar = 0; if (mkey == 'C' || mkey == 'V' || mkey == 'X')
skipCommand = true; {
mchar = 0;
skipCommand = true;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment