From 5a764c33f599e792674b5f4c01b4c0e51da262b7 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 3 Jul 2008 13:43:58 -0400 Subject: devdraw: OS X: fix Unicode input errors (Andrey Mirtchovski) --- src/cmd/devdraw/osx-screen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cmd/devdraw/osx-screen.c b/src/cmd/devdraw/osx-screen.c index 5a7e9ea9..e8897c1d 100644 --- a/src/cmd/devdraw/osx-screen.c +++ b/src/cmd/devdraw/osx-screen.c @@ -426,9 +426,11 @@ kbdevent(EventRef event) keystroke(k); else{ UniChar ch; - GetEventParameter(event, kEventParamKeyUnicodes, + OSStatus s; + + s = GetEventParameter(event, kEventParamKeyUnicodes, typeUnicodeText, nil, sizeof uc, nil, &uc); - if(uc >= 0) + if(s == noErr) keystroke(uc); } break; -- cgit v1.2.3