From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu cocoa.m
Date: Wed, 14 Jun 2006 15:53:24 +0000 [thread overview]
Message-ID: <E1FqXgK-0003wY-Dn@savannah.gnu.org> (raw)
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Fabrice Bellard <bellard> 06/06/14 15:53:24
Modified files:
. : cocoa.m
Log message:
cocoa monitor fix regarding the handling of dead keys (Joachim Henke)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/cocoa.m?cvsroot=qemu&r1=1.9&r2=1.10
Patches:
Index: cocoa.m
===================================================================
RCS file: /sources/qemu/qemu/cocoa.m,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- cocoa.m 22 May 2006 21:25:04 -0000 1.9
+++ cocoa.m 14 Jun 2006 15:53:24 -0000 1.10
@@ -439,23 +439,40 @@
kbd_put_keycode(keycode & 0x7f); //remove e0 bit in front
/* handle monitor key events */
} else {
+ int keysym = 0;
+
switch([event keyCode]) {
+ case 115:
+ keysym = QEMU_KEY_HOME;
+ break;
+ case 117:
+ keysym = QEMU_KEY_DELETE;
+ break;
+ case 119:
+ keysym = QEMU_KEY_END;
+ break;
case 123:
- kbd_put_keysym(QEMU_KEY_LEFT);
+ keysym = QEMU_KEY_LEFT;
break;
case 124:
- kbd_put_keysym(QEMU_KEY_RIGHT);
+ keysym = QEMU_KEY_RIGHT;
break;
case 125:
- kbd_put_keysym(QEMU_KEY_DOWN);
+ keysym = QEMU_KEY_DOWN;
break;
case 126:
- kbd_put_keysym(QEMU_KEY_UP);
+ keysym = QEMU_KEY_UP;
break;
default:
- kbd_put_keysym([[event characters] characterAtIndex:0]);
- break;
+ {
+ NSString *ks = [event characters];
+
+ if ([ks length] > 0)
+ keysym = [ks characterAtIndex:0];
+ }
}
+ if (keysym)
+ kbd_put_keysym(keysym);
}
}
}
next reply other threads:[~2006-06-14 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-14 15:53 Fabrice Bellard [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-22 23:25 [Qemu-devel] qemu cocoa.m Thiemo Seufer
2006-05-22 21:25 Fabrice Bellard
2006-04-16 13:34 Paul Brook
2005-12-18 19:18 Fabrice Bellard
2005-10-30 18:24 Fabrice Bellard
2005-04-07 20:36 Fabrice Bellard
2005-04-07 20:35 Fabrice Bellard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1FqXgK-0003wY-Dn@savannah.gnu.org \
--to=fabrice@bellard.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).