From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46360 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMUVR-0004NE-Vz for qemu-devel@nongnu.org; Sat, 27 Nov 2010 18:48:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMUVQ-0006JU-Nk for qemu-devel@nongnu.org; Sat, 27 Nov 2010 18:48:37 -0500 Received: from mail-bw0-f45.google.com ([209.85.214.45]:53543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMUVQ-0006JM-DB for qemu-devel@nongnu.org; Sat, 27 Nov 2010 18:48:36 -0500 Received: by bwz16 with SMTP id 16so2904306bwz.4 for ; Sat, 27 Nov 2010 15:48:35 -0800 (PST) Sender: Benjamin Drung Subject: Re: [Qemu-devel] [Bug 427612] Re: kvm sends caps lock key up event twice From: Benjamin Drung In-Reply-To: <4CEEC255.2020309@mail.berlios.de> References: <20090910235343.14184.29717.malonedeb@gangotri.canonical.com> <20101124214406.30688.1630.malone@wampee.canonical.com> <4CEEC255.2020309@mail.berlios.de> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-rScPd6U86bqrBn+j6Sj0" Date: Sun, 28 Nov 2010 00:48:31 +0100 Message-ID: <1290901711.2438.34.camel@deep-thought> Mime-Version: 1.0 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org --=-rScPd6U86bqrBn+j6Sj0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Donnerstag, den 25.11.2010, 21:08 +0100 schrieb Stefan Weil: > Am 24.11.2010 22:44, schrieb Benjamin Drung: > > Attached a new version of my patch. You find two branches linked to thi= s > > bug for maverick and natty. The patch sets SDL_DISABLE_LOCK_KEYS and ge= t > > rid of the complete workaround in qemu-kvm. This requires SDL >=3D 1.2.= 14. >=20 > For newer versions of SDL (those which use SDL_DISABLE_LOCK_KEYS > to disable special handling of the lock keys), your patch looks ok. > It is a working solution for maintainers of the latest Ubuntu releases. >=20 > But what about older versions? For those, your patch will make QEMU's > keyboard emulation unusable. Most older versions don't know > SDL_DISABLE_LOCK_KEYS. As far as I know, some SDL versions (from Debian > and Ubuntu) even used SDL_DISABLE_LOCK_KEYS with an inverted meaning. >=20 > I don't think we can simply ignore old or incompatible versions of SDL. > Therefore I suggest adding a runtime version check, so the emulation > can either use the old code (SDL < 1.2.14) or your new code (SDL >=3D 1.2= .14). Yes, that's better than not supporting older SDL versions. > The crucial point is whether "old" versions must be supported or not. > This is something which the QEMU community should decide. >=20 > > Stefan Weil wrote: > >> The patch might fix part of the problem, but there remain more issues: > >> > >> * SDL also sends an SDL_KEYUP event for caps lock when the > >> environment variable SDL_DISABLE_LOCK_KEYS is set. > >> This mode is very useful but currently unsupported by qemu/kvm. > > > > Addressed by new patch. > > > >> * Num lock and caps lock are handled in a similar way by SDL. > >> The patch only handles caps lock. Maybe this is less important > >> because keyboard layouts which remap num lock are rare > >> (I don't know any). > > > > Addressed by new patch. > > > >> * The keyboard status LEDs and the qemu client's keyboard status > >> can become unsynchronized if the input focus changes from qemu > >> to other applications. > > > > Is this a regression of my patch or is it the case for the unpatched > > qemu too? >=20 > That is no regression, but a weakness which existed from the > beginning. Your patch neither makes it better nor makes it worse. I don't know if it can really fixed for all keyboard layout combinations. Imagine using two keyboard layouts that have the caps lock key mapped on different keys. How do you want to keep the caps lock synchronized? > > ** Patch added: "caps-lock-key-up-event-v2.patch" > > https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/427612/+attachm= ent/1743919/+files/caps-lock-key-up-event-v2.patch >=20 > Just a small remark: > Inline patches (instead of links) are preferred on qemu-devel > because they make reading easier, and it's also easier for reviewers > to add comments. You request a new feature for Launchpad, because I used Launchpad to attach my patch. Look at https://launchpad.net/bugs/427612 . All comments for bugs in the qemu-kvm Ubuntu package are forwarded to the mailing list. --=20 Benjamin Drung Ubuntu Developer (www.ubuntu.com) | Debian Maintainer (www.debian.org) --=-rScPd6U86bqrBn+j6Sj0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJM8ZjPAAoJEBWetcTvyHdM4u8QAIyxRzb9xRZa9czMTeO5TjtK JvspVrxKSSJt664fy5ws+E1h3F4srdUPlATPzW7hIfZhb4nSdFRwfKhfKKvV40Ql jWQsKRHCm8+RiHlhp3/BFxHnzXmpkXAYszuxqAbd6D38LpbSFmnDy8kwZXZEIkvh HllEU4f9mVbe1TfLDcYXjh0gZ9gKL1ovcpnmSgmGzYdEG/cfVD3Z0y4XJ7IIvjvL iltwDATcPbCvQznZeUX306kqMCZub2gJTIs/kP++3jk+AufkSinZdxrunw/fxrSU CqgU8UXPe67DA/eDTUFzFXCvC7D7iGImm7J7HQYRu5wBIdbB/lNmHy9qbMIHvrge z9ZvIrdEceTowFa6B0sByA1pPIdfqyaCgiatQ6pRXKj+GcZKUWD2kfa6FzV81Euy Lzb9xVk5UcQUXern7PK9oWqQPuYwN9yUT4WX4XHnzR/Livl9k+NiRe1C8IpTM6UD XoK3tsXQC9UFX4wBcs7k7sZ4wotogZwaw/e5e1nyt1HbrZC5UmFX3U1wAu4hEtw2 r0u+jx63FD4k4bX34qiz2hoSg2cxo0R3/gBS+sbLo3XKQ3oKvpCx+ARt0VmzojUK +g/0Gl9pfpYZ5gt1TQpiZmI6dL4N16D9Y74MmGbF5IgIzsg9BnfpUlXX2WXVoL1I NthF19lXXuwR3J2HEevD =kNLX -----END PGP SIGNATURE----- --=-rScPd6U86bqrBn+j6Sj0--