From nobody Sat Nov 1 22:17:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1509135212474141.3580296088826; Fri, 27 Oct 2017 13:13:32 -0700 (PDT) Received: from localhost ([::1]:58841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8B0L-0005T2-08 for importer@patchew.org; Fri, 27 Oct 2017 16:13:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8AzP-00054Q-U7 for qemu-devel@nongnu.org; Fri, 27 Oct 2017 16:12:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8AzM-0001KV-Px for qemu-devel@nongnu.org; Fri, 27 Oct 2017 16:12:23 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:33332) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e8AzM-0001GC-JY; Fri, 27 Oct 2017 16:12:20 -0400 Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Fri, 27 Oct 2017 22:12:16 +0200 Received: from linux-cj2a.gns.novell.com (nwb-a10-snat.microfocus.com [10.120.13.202]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Fri, 27 Oct 2017 21:12:12 +0100 From: Liang Yan To: sstabellini@kernel.org, anthony.perard@citrix.com, xen-devel@lists.xenproject.org, qemu-devel@nongnu.org Date: Fri, 27 Oct 2017 16:12:07 -0400 Message-Id: <20171027201207.5979-1-lyan@suse.com> X-Mailer: git-send-email 2.14.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 195.135.221.5 Subject: [Qemu-devel] [PATCH] hw/display/xenfb: Simulate auto-repeat key events 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: qemu-trivial@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" New tigervnc server changes the way to send long pressed key, from "down up down up ..." to "down down ... up". So we insert an up event after each key down event to simulate auto-repeat key events for xen keyboard frontend driver. Signed-off-by: Liang Yan --- hw/display/xenfb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 8e2547ac05..a5f787a3f3 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -292,6 +292,9 @@ static void xenfb_key_event(void *opaque, int scancode) } trace_xenfb_key_event(opaque, scancode2linux[scancode], down); xenfb_send_key(xenfb, down, scancode2linux[scancode]); + if (down) { /* simulate auto-repeat key events */ + xenfb_send_key(xenfb, 0, scancode2linux[scancode]); + } } =20 /* --=20 2.14.2