From patchwork Mon Apr 9 09:40:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 896199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40KQLT23Ghz9s1l for ; Mon, 9 Apr 2018 19:41:53 +1000 (AEST) Received: from localhost ([::1]:51741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5TJ9-0005eV-Ao for incoming@patchwork.ozlabs.org; Mon, 09 Apr 2018 05:41:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5TIP-0005d7-3E for qemu-devel@nongnu.org; Mon, 09 Apr 2018 05:41:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5TIL-0003aw-UT for qemu-devel@nongnu.org; Mon, 09 Apr 2018 05:41:05 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37650 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 1f5TIL-0003ac-Q1 for qemu-devel@nongnu.org; Mon, 09 Apr 2018 05:41:01 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5D90840201A1 for ; Mon, 9 Apr 2018 09:41:01 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-117.ams2.redhat.com [10.36.116.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28CC6215CDAF; Mon, 9 Apr 2018 09:41:01 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9804E3EBB2; Mon, 9 Apr 2018 11:41:00 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 9 Apr 2018 11:40:58 +0200 Message-Id: <20180409094100.27650-5-kraxel@redhat.com> In-Reply-To: <20180409094100.27650-1-kraxel@redhat.com> References: <20180409094100.27650-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 09 Apr 2018 09:41:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 09 Apr 2018 09:41:01 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 4/6] sdl2: enable ctrl modifier keys for text consoles 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Unbreaks ctrl-pageup/pagedown scrollback. Signed-off-by: Gerd Hoffmann Message-id: 20180321135041.15768-4-kraxel@redhat.com Signed-off-by: Gerd Hoffmann --- ui/sdl2-input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 8d0d9ba17c..62c2b58ef0 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -90,6 +90,8 @@ void sdl2_process_key(struct sdl2_console *scon, } if (!qemu_console_is_graphic(con)) { + bool ctrl = (modifiers_state[SDL_SCANCODE_LCTRL] || + modifiers_state[SDL_SCANCODE_RCTRL]); if (ev->type == SDL_KEYDOWN) { switch (ev->keysym.scancode) { case SDL_SCANCODE_RETURN: @@ -99,7 +101,7 @@ void sdl2_process_key(struct sdl2_console *scon, kbd_put_keysym_console(con, QEMU_KEY_BACKSPACE); break; default: - kbd_put_qcode_console(con, qcode, false); + kbd_put_qcode_console(con, qcode, ctrl); break; } }