Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2011-10-21 23:09:14 +0400
committerDalai Felinto <dfelinto@gmail.com>2011-10-21 23:09:14 +0400
commit932aa116df985d21114dcad8c2518f69f8a6a39e (patch)
treeff46907038994a82e23fafd8ef4bef8c30c56230 /intern/ghost
parentc9035e20d0033e897aaea9ed761002ec02331ce4 (diff)
utf8 OSX - disabling utf8 at KeyUp, otherwise TextObject doesn't work.
This bug is also present in Windows, so I believe the real bug is in Linux (and in the text object input). Also Cmd+C and Cmd+v doesn't work for utf8 yet.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm8
1 files changed, 3 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index c3c0c591444..1a6aaadb506 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1707,10 +1707,6 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
}
}
- /* XXX the above code gives us the right utf8, however if we pass it along Font Object doesn't work.
- let's leave utf8 disabled for OSX before we fix that */
- utf8_buf[0] = '\0';//to be removed once things are working
-
if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSCommandKeyMask))
break; //Cmd-Q is directly handled by Cocoa
@@ -1718,8 +1714,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyDown, window, keyCode, ascii, utf8_buf) );
//printf("Key down rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
} else {
+ // XXX Font Object bug - backspace or adding new chars are being computed twice (keydown and keyup)
+ utf8_buf[0] = '\0';
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyUp, window, keyCode, ascii, utf8_buf) );
- //printf("Key down rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
+ //printf("Key up rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
}
break;