qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Arbuckle <programmingkidx@gmail.com>
To: "qemu-devel@nongnu.org qemu-devel peter . maydell @ linaro .
	org" <qemu-devel@nongnu.org>
Cc: John Arbuckle <programmingkidx@gmail.com>
Subject: [Qemu-devel] [PATCH 2/2] ui/cocoa.m: send ctrl-alt key combinations to guest if not used by QEMU
Date: Mon, 21 Aug 2017 16:52:23 -0400	[thread overview]
Message-ID: <20170821205225.3401-1-programmingkidx@gmail.com> (raw)

Send control-alt key combinations to the guest if not used by the user interface.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
 ui/cocoa.m | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index d3e7907103..6920ea38aa 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -634,6 +634,14 @@ - (void) handleEvent:(NSEvent *)event
                     case Q_KEY_CODE_G:
                         [self ungrabMouse];
                         break;
+
+                    // send to the guest
+                    default:
+                        if (qemu_console_is_graphic(NULL)) {
+                            qemu_input_event_send_key_qcode(dcl->con, keycode,
+                                                            true);
+                        }
+                    break;
                 }
 
             // handle keys for graphic console
-- 
2.11.0 (Apple Git-81)

             reply	other threads:[~2017-08-21 20:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 20:52 John Arbuckle [this message]
2017-08-21 20:52 ` [Qemu-devel] [PATCH 0/2] ui/cocoa.m: enable guest to see control-alt key combinations John Arbuckle
2017-08-21 20:52 ` [Qemu-devel] [PATCH 1/2] ui/cocoa.m: move ungrab to ctrl-alt-g John Arbuckle

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=20170821205225.3401-1-programmingkidx@gmail.com \
    --to=programmingkidx@gmail.com \
    --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).