Received: from eggs.gnu.org ([2001:4830:134:3::10]:46959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqgKz-0003jF-Ir for qemu-devel@nongnu.org; Fri, 17 Aug 2018 11:06:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqgKy-0002Fp-U4 for qemu-devel@nongnu.org; Fri, 17 Aug 2018 11:06:53 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56306 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fqgKy-0002FA-Mp for qemu-devel@nongnu.org; Fri, 17 Aug 2018 11:06:52 -0400 Date: Fri, 17 Aug 2018 16:06:49 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Message-ID: <20180817150649.GU11124@redhat.com> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <20180816172722.GK23515@redhat.com> <83320617-5d60-fe71-3ef5-8ac7c384a3b1@ubuntu.com> <20180817085656.GA11124@redhat.com> <20180817125808.GO11124@redhat.com> <20180817131226.GP11124@redhat.com> <20180817144421.GS11124@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180817144421.GS11124@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Pipe key broken on US keyboards List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Phillip Susi Cc: qemu-devel@nongnu.org On Fri, Aug 17, 2018 at 03:44:21PM +0100, Daniel P. Berrang=C3=A9 wrote: > On Fri, Aug 17, 2018 at 10:36:14AM -0400, Phillip Susi wrote: > > I've been reading up here: > > http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html > >=20 > > And man, what a mess keyboards are! Worse than floppy controllers. > > According to that site, the scan code for \ should be 0x2b, so why do= es > > xev say the keycode is 51? Is keycode something else entirely from s= can > > codes and keysyms? If so how can I see the scan code? >=20 > 0x2b is 43 in hex. >=20 > xev reports the Xorg scancode, which is the same as the XT/AT-set1 > scancodes, with an offset of 8 added >=20 > IOW, 51 from xev does actually match 0x2b from XT scancode set Opps, slight mistake there. On *old* Xorg using the 'kbd' driver it would correspond to XT/AT-set1 scancodes. On *new* Xorg using the 'evdev' driver it would correspond to Linux keycodes. Fortunately in this particular case the Linux keycode is the same as the XT scancode so the conversion I illustrate was still correct :-) Regards, Daniel --=20 |: https://berrange.com -o- https://www.flickr.com/photos/dberran= ge :| |: https://libvirt.org -o- https://fstop138.berrange.c= om :| |: https://entangle-photo.org -o- https://www.instagram.com/dberran= ge :|