From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7CADC433E0 for ; Mon, 1 Feb 2021 17:20:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56E6764E54 for ; Mon, 1 Feb 2021 17:20:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56E6764E54 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6csi-0004jw-7o for qemu-devel@archiver.kernel.org; Mon, 01 Feb 2021 12:20:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6cfs-0008V9-Oe for qemu-devel@nongnu.org; Mon, 01 Feb 2021 12:07:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l6cfn-0003kG-Kj for qemu-devel@nongnu.org; Mon, 01 Feb 2021 12:07:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612199253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CgyzMH3X/JTRmozoTjhird/tS7PoCfbCEjiYYVQw/50=; b=LWdcdxz/3a8mvpNqwZmI3tSHyMleF+NtiKJoZDVo8tRLiEoethRMxP4adqq+pDMHFqI70c 2Jvs/By4pOhbdsyOmB+akrjOTY4EfnFaMvCx9qd4NYiT6HqsySJLOsIa4aTPnOf/QR6ZIj 7S4u+peu60ybZTUAsSJhxkEu83Rf/zw= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-486-fOz0Rmr4OaC3Y0YSvV__NQ-1; Mon, 01 Feb 2021 12:07:19 -0500 X-MC-Unique: fOz0Rmr4OaC3Y0YSvV__NQ-1 Received: by mail-wr1-f71.google.com with SMTP id h18so10775519wrr.5 for ; Mon, 01 Feb 2021 09:07:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xnhrKKYkEPpWgAPsmOWVz1UunuEtvF+bQqFS3G5wWCU=; b=rIXNF0PaKWNiZaRkRCevJ+V8GATQEhBCZZOxIPlYBTfSwgt2VJb6qrWppxsbwYHn6J 5AIkk2dG17dUSj/qRMROq59WniuZPeN40eQqfYl8c/6Lnr59VVTWrXuN79o7cB6iBMh2 sfxBMZedbgZpsmZLQ4W8GSZaH9+pG9FAcwX7EJnlM4OYEUjvOsuWZM8SELtBDIYgAqBJ 6QPb7PDzgMOMm9UmUsVprx9rRC/X/taCBRBcOltt1KnQ7nOY6uqsbHskpe4ie/VpWYPr 0WGeEq9aYPoaw5CfHnq1fl0WvzNO64xv/qgAjkjt3qkSjEPcJahTV8LYkQ8PL+qSs9rU 2EAA== X-Gm-Message-State: AOAM5310hE6ZRBSKUQk3PDqxGbwone0GZrob331W+TBKawMrrfLbbWj9 N4rDzGJPmy4ooKnopOW65t4z60f+H8YUK2GbUXJIa15j9HHS4qMkA5LhOveu9YJxhMnjGnyAzOi tTYNqlxPMnImC/3U= X-Received: by 2002:adf:dd45:: with SMTP id u5mr18988022wrm.392.1612199238386; Mon, 01 Feb 2021 09:07:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIDeljwivDOrsElWly+Q/WzVccRKZN1RAQPoCloFGWRVrwFqzmJx1j3QsuMUHhOyq0de3Q+w== X-Received: by 2002:adf:dd45:: with SMTP id u5mr18987991wrm.392.1612199238172; Mon, 01 Feb 2021 09:07:18 -0800 (PST) Received: from ?IPv6:2a01:e0a:466:71c0:f46f:cfeb:afa5:1898? ([2a01:e0a:466:71c0:f46f:cfeb:afa5:1898]) by smtp.gmail.com with ESMTPSA id b138sm9073683wmb.35.2021.02.01.09.07.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2021 09:07:17 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: vnc clipboard support From: Christophe de Dinechin In-Reply-To: <20210129150454.fgfhrcrqao7aqee5@sirius.home.kraxel.org> Date: Mon, 1 Feb 2021 18:07:16 +0100 Message-Id: <8701EE73-CA92-42F1-9F7E-C8E352531A1C@redhat.com> References: <20210128171224.exbklnwtyb232oe2@sirius.home.kraxel.org> <20210129080323.xuvokq5kytoomx6j@sirius.home.kraxel.org> <8E05F8C9-A60D-45A9-AFCB-79D866F57660@redhat.com> <20210129110814.GF4001740@redhat.com> <0F802343-19F8-487C-8BBE-5BBE2014BA1C@redhat.com> <20210129150454.fgfhrcrqao7aqee5@sirius.home.kraxel.org> To: Gerd Hoffmann X-Mailer: Apple Mail (2.3654.40.0.2.32) Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cdupontd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=63.128.21.124; envelope-from=cdupontd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?B?IkRhbmllbCBQLiBCZXJyYW5nw6ki?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" > On 29 Jan 2021, at 16:04, Gerd Hoffmann wrote: >=20 > Hi, >=20 >> Unless we para-virtualize the keyboard? >=20 > The main advantage of paste via key events is that it doesn't require > guest support. The main disadvantage, though, is that it does not work at all ;-) Imagine pasting Ademar's favorite signature, :wq! Or pasting "ahs" to a guest that thinks the control key is down (a not uncommon occurence with VNC, in my personal experience). So now you pasted "Select All, Delete, Save" in many GUI apps. (insert infinite variations on the "doom" theme here) > Requiring any kind of software in the guest (paravirt > keyboard driver, agent figuring the keymap, whatever else) kills that > advantage. Indeed. I was pointing out that any option that brought any modicum of reasonable paste behavior (ignoring copy for the moment) required some in-guest piece of software. So we might as well go for one that is known to work, and also deals with the copy-from-guest issue. > And if we need guest cooperation anyway it is much better > to just read/write the guest clipboard directly. =E2=80=A6 which is exactly what VNC in the guest knows how to do in a reasonable way, on a large number of platforms. So I don't see any benefit to reinvent that wheel. I'd rather leverage the VNC code to build a solid, multi-platform agent. You can extract the clipboard code into some smaller agent that talks to a specific qemu character device if you think it's a worthy optimization. >=20 > Standard keyboard seems to not be an option either. The HID specs > (https://usb.org/document-library/hid-usage-tables-121) lists a > Unicode Page (Section 18), which looks like it could be used to > send unicode chars to the guest. Problem is (a) this is 16bit > only (so no emoji) and (b) widely unimplemented in guest OSes. Some operating systems have a way to enter unicode code points. On Linux, you can sometimes type shift-control u (hex code), but it's a bit dependent on the some alignment of mysterious planets. On Windows, you can type alt-x. Sometimes. Or alt + . On macOS, you need to enable Unicode Hex Input, so unreliable. Not that I would recommend trying any of that ;-)