Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 83628C6FD19 for ; Mon, 13 Mar 2023 13:43:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbiSG-0005ao-Ni; Mon, 13 Mar 2023 09:43:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbiSC-0005YG-5u for qemu-devel@nongnu.org; Mon, 13 Mar 2023 09:43:08 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbiSA-0001DI-8U for qemu-devel@nongnu.org; Mon, 13 Mar 2023 09:43:07 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 9CDEC7462DB; Mon, 13 Mar 2023 14:42:36 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 6271C745706; Mon, 13 Mar 2023 14:42:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id 613037456E3; Mon, 13 Mar 2023 14:42:36 +0100 (CET) Date: Mon, 13 Mar 2023 14:42:36 +0100 (CET) From: BALATON Zoltan To: Christian Schoenebeck cc: qemu-devel@nongnu.org, Gerd Hoffmann , Akihiko Odaki , Peter Maydell , =?ISO-8859-15?Q?Philippe_Mathieu-Daud=E9?= Subject: Re: [PATCH] ui/cocoa: user friendly characters for release mouse In-Reply-To: <4105880.gIe6kQ2GIU@silver> Message-ID: References: <3215072.rVCME8qtki@silver> <4105880.gIe6kQ2GIU@silver> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Mon, 13 Mar 2023, Christian Schoenebeck wrote: > On Monday, February 27, 2023 12:28:02 PM CET Christian Schoenebeck wrote: >> On Tuesday, December 27, 2022 5:15:31 PM CET Christian Schoenebeck wrote: >>> While mouse is grabbed, window title contains a hint for the user what >>> keyboard keys to press to release the mouse. Make that hint text a bit >>> more user friendly for a Mac user: >>> >>> - Replace "Ctrl" and "Alt" by appropriate symbols for those keyboard >>> keys typically displayed for them on a Mac (encode those symbols by >>> using UTF-8 characters). >>> >>> - Drop " + " in between the keys, as that's not common on macOS for >>> documenting keyboard shortcuts. >>> >>> - Convert lower case "g" to upper case "G", as that's common on macOS. >>> >>> - Add one additional space at start and end of key stroke set, to >>> visually separate the key strokes from the rest of the text. >>> >>> Signed-off-by: Christian Schoenebeck >>> --- >> >> Ping > > Gerd, > > given that I got a RB and TB from Philippe, would you queue this minor macOS > patch please? Isn't this already merged as 23bdd0de97a18 ? Regards, BALATON Zoltan > Best regards, > Christian Schoenebeck > >>> ui/cocoa.m | 7 +++++-- >>> 1 file changed, 5 insertions(+), 2 deletions(-) >>> >>> diff --git a/ui/cocoa.m b/ui/cocoa.m >>> index e915c344a8..289a2b193e 100644 >>> --- a/ui/cocoa.m >>> +++ b/ui/cocoa.m >>> @@ -72,6 +72,9 @@ >>> >>> #define cgrect(nsrect) (*(CGRect *)&(nsrect)) >>> >>> +#define UC_CTRL_KEY "\xe2\x8c\x83" >>> +#define UC_ALT_KEY "\xe2\x8c\xa5" >>> + >>> typedef struct { >>> int width; >>> int height; >>> @@ -1135,9 +1138,9 @@ - (void) grabMouse >>> >>> if (!isFullscreen) { >>> if (qemu_name) >>> - [normalWindow setTitle:[NSString stringWithFormat:@"QEMU %s - (Press ctrl + alt + g to release Mouse)", qemu_name]]; >>> + [normalWindow setTitle:[NSString stringWithFormat:@"QEMU %s - (Press " UC_CTRL_KEY " " UC_ALT_KEY " G to release Mouse)", qemu_name]]; >>> else >>> - [normalWindow setTitle:@"QEMU - (Press ctrl + alt + g to release Mouse)"]; >>> + [normalWindow setTitle:@"QEMU - (Press " UC_CTRL_KEY " " UC_ALT_KEY " G to release Mouse)"]; >>> } >>> [self hideCursor]; >>> CGAssociateMouseAndMouseCursorPosition(isAbsoluteEnabled); >>> >> >> >> >> > > > > >