plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 5a764c33f599e792674b5f4c01b4c0e51da262b7
parent cdead40b9bb4b40469d3aa3c31ec30904113114f
Author: Russ Cox <rsc@swtch.com>
Date:   Thu,  3 Jul 2008 13:43:58 -0400

devdraw: OS X: fix Unicode input errors (Andrey Mirtchovski)

Diffstat:
Msrc/cmd/devdraw/osx-screen.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 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;