From patchwork Mon Aug 21 20:52:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 9913765 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F66B603FA for ; Mon, 21 Aug 2017 20:53:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 319FF27C05 for ; Mon, 21 Aug 2017 20:53:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 250A92859A; Mon, 21 Aug 2017 20:53:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A2A7727C05 for ; Mon, 21 Aug 2017 20:53:58 +0000 (UTC) Received: from localhost ([::1]:54355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djthg-0002hG-7J for patchwork-qemu-devel@patchwork.kernel.org; Mon, 21 Aug 2017 16:53:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djtgk-0002fO-B6 for qemu-devel@nongnu.org; Mon, 21 Aug 2017 16:52:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djtgh-00019p-Oc for qemu-devel@nongnu.org; Mon, 21 Aug 2017 16:52:46 -0400 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]:36536) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1djtgh-000194-Jr for qemu-devel@nongnu.org; Mon, 21 Aug 2017 16:52:43 -0400 Received: by mail-it0-x241.google.com with SMTP id 190so2221850itx.3 for ; Mon, 21 Aug 2017 13:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5dEpSDnJHvMJQhMDcawDORdvDcl9XlY4OK5cyIHfffM=; b=B4n7nHufI1oaLi8l4w+j0B0xMd6cgF9YB5l7K1BRqJ7F8ebUch7U6B4l0TY1SSG/SC QNDIMFD15/OjlLoCyNeDzwW79rNgstYGcR9HwjbvFXhLt2ARfaMdZa4bR28p4FKWUWXV 6SbUtIo++6lIbQWnKBsz2ouU/tyashh2xn2EB3dXPR51pvNFGLxSMnQRPPxHsZyndSyk C+k9ZXqMbLB8shXEUzpbhyr3q0H3GgVPLrjaLHtNF4CvWtyX4RPFtONPTn5AFu9AmKVa m4RxfADcVdB8pionaya89qcBepAPJBhA+l/Jcg6K7fK7tkD1YXzqPP3g/LIe3z92gLNP BOpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5dEpSDnJHvMJQhMDcawDORdvDcl9XlY4OK5cyIHfffM=; b=IMrHwb3oTW0ikcSo1j0xz/3ppWOTv4BDTwOHZefnUq4XmMvRhTqNMXTvatDLzj+sJF 3kTJS5fhzrA4gYtMC/9egk84Tdk/1qgjMR+NOmONoc6gxDHxx1B0LByZ46ivAC/EzZqd 64slmQ/pHH0RMPBZgVj1RViFbghLnlHPJxYxb1Gn+z2NiZGcC7tUk9HU+SsVlrq15gXf 3W6cAI0nqhVcgahNUXnCH+5TWxAJCe/K3KjQHJGeh2zAacEH+OZWWaEPl5bz9FYk50fy hL4KpyDRm7tZxA/bEbFSQBeDJu1+m+GXvzKkMq7W+KRIujgWhj3nyAMfmr//r0MXfwrJ zDtg== X-Gm-Message-State: AHYfb5hE9/qU9+EhQYzPkLrUzxqsWwsyn1oAxreRgW9f0V3y0gPvzpyZ cC646+wONGRjnngb X-Received: by 10.36.252.69 with SMTP id b66mr1328651ith.171.1503348760344; Mon, 21 Aug 2017 13:52:40 -0700 (PDT) Received: from localhost.localdomain (d199-74-164-53.col.wideopenwest.com. [74.199.53.164]) by smtp.gmail.com with ESMTPSA id 27sm6119096ioj.61.2017.08.21.13.52.39 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 21 Aug 2017 13:52:39 -0700 (PDT) From: John Arbuckle To: "qemu-devel@nongnu.org qemu-devel peter . maydell @ linaro . org" Date: Mon, 21 Aug 2017 16:52:23 -0400 Message-Id: <20170821205225.3401-1-programmingkidx@gmail.com> X-Mailer: git-send-email 2.11.0 (Apple Git-81) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::241 Subject: [Qemu-devel] [PATCH 2/2] ui/cocoa.m: send ctrl-alt key combinations to guest if not used by QEMU X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Arbuckle Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Send control-alt key combinations to the guest if not used by the user interface. Signed-off-by: John Arbuckle --- 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