qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU
@ 2017-07-27 14:51 Programmingkid
  2017-07-27 14:54 ` Daniel P. Berrange
  2017-07-27 14:55 ` Eric Blake
  0 siblings, 2 replies; 7+ messages in thread
From: Programmingkid @ 2017-07-27 14:51 UTC (permalink / raw)
  To: Peter Maydell, Markus Armbruster, Eric Blake
  Cc: qemu-devel@nongnu.org qemu-devel

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 <programmingkidx@gmail.com>
---
 qapi-schema.json  | 6 +++++-
 ui/input-keymap.c | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index 9c6c3e1..a051820 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4842,6 +4842,10 @@
 # @hiragana: since 2.9
 # @henkan: since 2.9
 # @yen: since 2.9
+# @f16: since 2.10
+# @f17: since 2.10
+# @f18: since 2.10
+# @f19: since 2.10
 #
 # Since: 1.3.0
 #
@@ -4864,7 +4868,7 @@
             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
             'ro', 'hiragana', 'henkan', 'yen',
-            'kp_comma', 'kp_equals', 'power' ] }
+            'kp_comma', 'kp_equals', 'power', 'f16', 'f17', 'f18', 'f19'] }
 
 ##
 # @KeyValue:
diff --git a/ui/input-keymap.c b/ui/input-keymap.c
index 8a1476f..d1169e3 100644
--- a/ui/input-keymap.c
+++ b/ui/input-keymap.c
@@ -114,6 +114,10 @@ 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_PRINT] = 0xb7,
 
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU
  2017-07-27 14:51 [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU Programmingkid
@ 2017-07-27 14:54 ` Daniel P. Berrange
  2017-07-28  2:36   ` Programmingkid
  2017-07-27 14:55 ` Eric Blake
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel P. Berrange @ 2017-07-27 14:54 UTC (permalink / raw)
  To: Programmingkid
  Cc: Peter Maydell, Markus Armbruster, Eric Blake,
	qemu-devel@nongnu.org qemu-devel

On Thu, Jul 27, 2017 at 10:51:33AM -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 <programmingkidx@gmail.com>
> ---
>  qapi-schema.json  | 6 +++++-
>  ui/input-keymap.c | 4 ++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 9c6c3e1..a051820 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -4842,6 +4842,10 @@
>  # @hiragana: since 2.9
>  # @henkan: since 2.9
>  # @yen: since 2.9
> +# @f16: since 2.10
> +# @f17: since 2.10
> +# @f18: since 2.10
> +# @f19: since 2.10
>  #
>  # Since: 1.3.0
>  #
> @@ -4864,7 +4868,7 @@
>              'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
>              'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
>              'ro', 'hiragana', 'henkan', 'yen',
> -            'kp_comma', 'kp_equals', 'power' ] }
> +            'kp_comma', 'kp_equals', 'power', 'f16', 'f17', 'f18', 'f19'] }

Linux and AT set 1 go all the way to F24, and OS-X goes to F20, so don't
arbitrarily stop short at F19

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 :|

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU
  2017-07-27 14:51 [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU Programmingkid
  2017-07-27 14:54 ` Daniel P. Berrange
@ 2017-07-27 14:55 ` Eric Blake
  2017-07-28  2:37   ` Programmingkid
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Blake @ 2017-07-27 14:55 UTC (permalink / raw)
  To: Programmingkid, Peter Maydell, Markus Armbruster
  Cc: qemu-devel@nongnu.org qemu-devel

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

On 07/27/2017 09:51 AM, Programmingkid wrote:

You forgot in-reply-to: and references: headers, meaning this was not
threaded with your 0/2 patch.

> 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 <programmingkidx@gmail.com>
> ---
>  qapi-schema.json  | 6 +++++-
>  ui/input-keymap.c | 4 ++++
>  2 files changed, 9 insertions(+), 1 deletion(-)

Conflicts with Gerd's pending UI pull; so you'll need to rebase.
Furthermore, while Gerd added keys after softfreeze (necessary to fix a
regression), your additions seem to be a new feature rather than a bug
fix, and may therefore be more appropriate for 2.11.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU
  2017-07-27 14:54 ` Daniel P. Berrange
@ 2017-07-28  2:36   ` Programmingkid
  2017-07-28  8:15     ` Daniel P. Berrange
  0 siblings, 1 reply; 7+ messages in thread
From: Programmingkid @ 2017-07-28  2:36 UTC (permalink / raw)
  To: Daniel P. Berrange
  Cc: Peter Maydell, Markus Armbruster, Eric Blake,
	qemu-devel@nongnu.org qemu-devel


> On Jul 27, 2017, at 10:54 AM, Daniel P. Berrange <berrange@redhat.com> wrote:
> 
> On Thu, Jul 27, 2017 at 10:51:33AM -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 <programmingkidx@gmail.com>
>> ---
>> qapi-schema.json  | 6 +++++-
>> ui/input-keymap.c | 4 ++++
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>> 
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index 9c6c3e1..a051820 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -4842,6 +4842,10 @@
>> # @hiragana: since 2.9
>> # @henkan: since 2.9
>> # @yen: since 2.9
>> +# @f16: since 2.10
>> +# @f17: since 2.10
>> +# @f18: since 2.10
>> +# @f19: since 2.10
>> #
>> # Since: 1.3.0
>> #
>> @@ -4864,7 +4868,7 @@
>>             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
>>             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
>>             'ro', 'hiragana', 'henkan', 'yen',
>> -            'kp_comma', 'kp_equals', 'power' ] }
>> +            'kp_comma', 'kp_equals', 'power', 'f16', 'f17', 'f18', 'f19'] }
> 
> Linux and AT set 1 go all the way to F24, and OS-X goes to F20, so don't
> arbitrarily stop short at F19
> 
> Regards,
> Daniel

I think I will future-proof this patch by going all the way to F30. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU
  2017-07-27 14:55 ` Eric Blake
@ 2017-07-28  2:37   ` Programmingkid
  2017-07-28 12:01     ` Eric Blake
  0 siblings, 1 reply; 7+ messages in thread
From: Programmingkid @ 2017-07-28  2:37 UTC (permalink / raw)
  To: Eric Blake
  Cc: Peter Maydell, Markus Armbruster,
	qemu-devel@nongnu.org qemu-devel


> On Jul 27, 2017, at 10:55 AM, Eric Blake <eblake@redhat.com> wrote:
> 
> On 07/27/2017 09:51 AM, Programmingkid wrote:
> 
> You forgot in-reply-to: and references: headers, meaning this was not
> threaded with your 0/2 patch.

Git send-email doesn't work for me. It complains about missing Perl modules. 

> 
>> 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 <programmingkidx@gmail.com>
>> ---
>> qapi-schema.json  | 6 +++++-
>> ui/input-keymap.c | 4 ++++
>> 2 files changed, 9 insertions(+), 1 deletion(-)
> 
> Conflicts with Gerd's pending UI pull; so you'll need to rebase.
> Furthermore, while Gerd added keys after softfreeze (necessary to fix a
> regression), your additions seem to be a new feature rather than a bug
> fix, and may therefore be more appropriate for 2.11.

Good idea. I will change the 'since' values to 2.11 in the next patch.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU
  2017-07-28  2:36   ` Programmingkid
@ 2017-07-28  8:15     ` Daniel P. Berrange
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrange @ 2017-07-28  8:15 UTC (permalink / raw)
  To: Programmingkid
  Cc: Peter Maydell, Markus Armbruster, Eric Blake,
	qemu-devel@nongnu.org qemu-devel

On Thu, Jul 27, 2017 at 10:36:02PM -0400, Programmingkid wrote:
> 
> > On Jul 27, 2017, at 10:54 AM, Daniel P. Berrange <berrange@redhat.com> wrote:
> > 
> > On Thu, Jul 27, 2017 at 10:51:33AM -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 <programmingkidx@gmail.com>
> >> ---
> >> qapi-schema.json  | 6 +++++-
> >> ui/input-keymap.c | 4 ++++
> >> 2 files changed, 9 insertions(+), 1 deletion(-)
> >> 
> >> diff --git a/qapi-schema.json b/qapi-schema.json
> >> index 9c6c3e1..a051820 100644
> >> --- a/qapi-schema.json
> >> +++ b/qapi-schema.json
> >> @@ -4842,6 +4842,10 @@
> >> # @hiragana: since 2.9
> >> # @henkan: since 2.9
> >> # @yen: since 2.9
> >> +# @f16: since 2.10
> >> +# @f17: since 2.10
> >> +# @f18: since 2.10
> >> +# @f19: since 2.10
> >> #
> >> # Since: 1.3.0
> >> #
> >> @@ -4864,7 +4868,7 @@
> >>             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
> >>             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
> >>             'ro', 'hiragana', 'henkan', 'yen',
> >> -            'kp_comma', 'kp_equals', 'power' ] }
> >> +            'kp_comma', 'kp_equals', 'power', 'f16', 'f17', 'f18', 'f19'] }
> > 
> > Linux and AT set 1 go all the way to F24, and OS-X goes to F20, so don't
> > arbitrarily stop short at F19
> 
> I think I will future-proof this patch by going all the way to F30.

No, don't do that - we only want QKeyCodes that have a corresponding
mapping in the Linux key names, so F24 is the max we should have.

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 :|

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU
  2017-07-28  2:37   ` Programmingkid
@ 2017-07-28 12:01     ` Eric Blake
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Blake @ 2017-07-28 12:01 UTC (permalink / raw)
  To: Programmingkid
  Cc: Peter Maydell, Markus Armbruster,
	qemu-devel@nongnu.org qemu-devel

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

On 07/27/2017 09:37 PM, Programmingkid wrote:
> 
>> On Jul 27, 2017, at 10:55 AM, Eric Blake <eblake@redhat.com> wrote:
>>
>> On 07/27/2017 09:51 AM, Programmingkid wrote:
>>
>> You forgot in-reply-to: and references: headers, meaning this was not
>> threaded with your 0/2 patch.
> 
> Git send-email doesn't work for me. It complains about missing Perl modules. 

Then install those modules.  Need help? Pasting the actual error message
(or googling for it) will probably speed you up.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-28 12:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27 14:51 [Qemu-devel] [PATCH 1/2] Add more function keys to QEMU Programmingkid
2017-07-27 14:54 ` Daniel P. Berrange
2017-07-28  2:36   ` Programmingkid
2017-07-28  8:15     ` Daniel P. Berrange
2017-07-27 14:55 ` Eric Blake
2017-07-28  2:37   ` Programmingkid
2017-07-28 12:01     ` Eric Blake

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).