From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcASh-0004Lx-Hi for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:10:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcASd-0003Oy-Gx for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:10:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45541) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dcASd-0003OG-7m for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:10:15 -0400 Date: Mon, 31 Jul 2017 14:10:10 +0100 From: "Daniel P. Berrange" Message-ID: <20170731131010.GB21310@redhat.com> Reply-To: "Daniel P. Berrange" References: <20170731094657.GE766@redhat.com> <421095EC-3086-46A4-AA1E-653831EA746D@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <421095EC-3086-46A4-AA1E-653831EA746D@gmail.com> Subject: Re: [Qemu-devel] [PATCH v2 1/2] Add more function keys to QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Peter Maydell , Eric Blake , "qemu-devel@nongnu.org qemu-devel" On Mon, Jul 31, 2017 at 08:46:56AM -0400, Programmingkid wrote: > > > On Jul 31, 2017, at 5:46 AM, Daniel P. Berrange wrote: > > > > On Sun, Jul 30, 2017 at 04:29:27PM -0400, Programmingkid wrote: > >> There are now keyboards that have 19 function keys. This patch extends QEMU so these function keys can be used. > >> > >> Signed-off-by: John Arbuckle > >> --- > >> qapi-schema.json | 12 +++++++++++- > >> ui/input-keymap.c | 9 +++++++++ > >> 2 files changed, 20 insertions(+), 1 deletion(-) > >> > >> diff --git a/qapi-schema.json b/qapi-schema.json > >> index c96f0a2..f1c989b 100644 > >> --- a/qapi-schema.json > >> +++ b/qapi-schema.json > >> @@ -4862,6 +4862,15 @@ > >> # @ac_refresh: since 2.10 > >> # @ac_bookmarks: since 2.10 > >> # altgr, altgr_r: dropped in 2.10 > >> +# @f16: since 2.11 > >> +# @f17: since 2.11 > >> +# @f18: since 2.11 > >> +# @f19: since 2.11 > >> +# @f20: since 2.11 > >> +# @f21: since 2.11 > >> +# @f22: since 2.11 > >> +# @f23: since 2.11 > >> +# @f24: since 2.11 > >> # > >> # Since: 1.3.0 > >> # > >> @@ -4888,7 +4897,8 @@ > >> 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute', > >> 'volumeup', 'volumedown', 'mediaselect', > >> 'mail', 'calculator', 'computer', > >> - 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] } > >> + 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks', > >> + 'f16', 'f17', 'f18', 'f19', 'f20', 'f21', 'f22', 'f23', 'f24'] } > >> > >> ## > >> # @KeyValue: > > > > This bit looks fine. > > > >> diff --git a/ui/input-keymap.c b/ui/input-keymap.c > >> index cf979c2..c0413e1 100644 > >> --- a/ui/input-keymap.c > >> +++ b/ui/input-keymap.c > >> @@ -251,6 +251,15 @@ static const int qcode_to_number[] = { > >> > >> [Q_KEY_CODE_F11] = 0x57, > >> [Q_KEY_CODE_F12] = 0x58, > >> + [Q_KEY_CODE_F16] = 0x59, > >> + [Q_KEY_CODE_F17] = 0x5a, > >> + [Q_KEY_CODE_F18] = 0x5b, > >> + [Q_KEY_CODE_F19] = 0x5c, > >> + [Q_KEY_CODE_F20] = 0x5d, > >> + [Q_KEY_CODE_F21] = 0x5e, > >> + [Q_KEY_CODE_F22] = 0x5f, > >> + [Q_KEY_CODE_F23] = 0x60, > >> + [Q_KEY_CODE_F24] = 0x61, > > > > You've got a gap there F13, F14, F15 were all missing (pre-existing bug in > > QEMU), so you can't carry on just incrementing after F12. > > Actually F13, F14,and F15 are called Q_KEY_CODE_PRINT, Q_KEY_CODE_SCROLL_LOCK, > and Q_KEY_CODE_PAUSE respectively. Huh. That's not right. Print/Scroll/Pause are completely separate to F13/14/15 Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|