From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode? Date: Fri, 12 Jul 2024 21:57:49 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23216"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Pierre Rouleau Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 12 16:58:33 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sSHjF-0005tw-Dz for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 Jul 2024 16:58:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSHir-0003Sq-DP; Fri, 12 Jul 2024 10:58:09 -0400 Original-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 1sSHip-0003SH-31 for help-gnu-emacs@gnu.org; Fri, 12 Jul 2024 10:58:07 -0400 Original-Received: from mail-vs1-xe2d.google.com ([2607:f8b0:4864:20::e2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSHik-0006lp-5o for help-gnu-emacs@gnu.org; Fri, 12 Jul 2024 10:58:06 -0400 Original-Received: by mail-vs1-xe2d.google.com with SMTP id ada2fe7eead31-48fddd09ba2so747781137.0 for ; Fri, 12 Jul 2024 07:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720796281; x=1721401081; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FUFg1VcAkXMneHjPsCFjQYpulNyzETnp/wV0WBZWPdg=; b=ChqgwyJtm5N8cQEjvu1OISFW8uFzDGcV+3oVuc/eq0iEj3cTXt9hxkviBIhK9Q+MHM RNISOi+j1d+qIEzxCHvSNagFnsLBBrMXmBrVgE4bSU43oKs2l6ZVyACPxDwxFbc/Koc8 tSlXdOZYGPAa1qHa7eAJf9oc5e+pNpat8hnrYgfqOBek5BByLU64OFTbcXa/6M78YPZ/ KpblmeCcybwDFUS4XtbWQ49AWNxW1gWHMMOSh1lySeRZiKjRxjskP4qokoBK0Sg5QQnT OpBR4E9Tcn8iZtpB53IpZqbCMt0zb0g/RbOSnlOt8HQ5HpPSiAszGPXtcD8afehiPD7a qM+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720796281; x=1721401081; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FUFg1VcAkXMneHjPsCFjQYpulNyzETnp/wV0WBZWPdg=; b=pbLCIS/FltXKB4s1008NmeIA4OPa8QjIGCoCzV3YYQ/O32bYNIrRbvj0Xp8+xm49mu 4iXXOtfQX1SdRwEUFCq4+MHJ+35hap2afRKy8QpwgSPkFr7c8XNBQYuEo666CmKL88sL nUdjT/NMF1/7XR76zpTRZY9qadlyK+EEwS8UoQOH3I7aabv5WQMWo5Xt01DACGp9AYKb knlSVq35VveFpFbEqnDyry60xhzF/AKGLc07V1NrpW6fbkhPsHioVZkzKnVjzm1IE5da Af9fOnNqrNGMmTY3KKYzoENvXKEH+CSheETK1qKm+lsypR8eb1sdPeVaxnsqf54LgWmw ykvA== X-Gm-Message-State: AOJu0YyLZceizb/SlcG5UAMR7SLMek33SYVKbt6MK2ME7q8DacaIYxlK GfI3HWjQpUgz8F3NPbf2VTdawmhgct2Crh0eaHXw5c++GPdyL0pNypMgcHf/HmFQxpc5ylX+bVl mzm2j88AR7wyXL56/uXXFzaGSNOuOlA== X-Google-Smtp-Source: AGHT+IHENH7IOggLWRNOFMJFtCWCsEXNa9fmlQR8jqhcSreGAFXAPZwcZMPmPf65O30kXiATRZRTcYk3o/Cb61vwouc= X-Received: by 2002:a05:6102:6cf:b0:48f:eabd:d72a with SMTP id ada2fe7eead31-490321a2706mr13957598137.17.1720796281021; Fri, 12 Jul 2024 07:58:01 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::e2d; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147168 Archived-At: On Fri, 12 Jul 2024 at 21:41, Pierre Rouleau wrote: > The code can determine if Emacs is running a GUI mode or in a terminal mode. > In GUI mode it would assume that everything is possible. > In terminal mode the issue is being able to distinguish > whether the key sequence can be bound or not. Even that is in general not solvable. Given an Emacs daemon, you can connect to it with a GUI client and a terminal-based client, and they will coexist peacefully.