From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages Date: Sat, 13 Feb 2021 17:26:16 +0300 Message-ID: References: <87zh098lo4.fsf@posteo.net> <329d68a5ed26ba41356b@heytings.org> <87h7mhgyxj.fsf@posteo.net> <329d68a5ed0dcd10a78a@heytings.org> <87czx5gpuj.fsf@posteo.net> <329d68a5ed4f4c7e84fb@heytings.org> <877dndgnhp.fsf@posteo.net> <329d68a5edfafadfe7cd@heytings.org> <87ft2087d8.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35430"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 15:29:20 2021 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 1lAvvE-000987-BR for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 15:29:20 +0100 Original-Received: from localhost ([::1]:33712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAvvD-0006p7-EK for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 09:29:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAvu9-0006on-16 for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 09:28:13 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:41765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAvu3-0006wu-Ok for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 09:28:09 -0500 Original-Received: from localhost ([::ffff:197.157.0.47]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E078.000000006027E1F4.0000046A; Sat, 13 Feb 2021 07:28:04 -0700 Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87ft2087d8.fsf@zoho.eu> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:127934 Archived-At: * Emanuel Berg via Users list for the GNU Emacs text editor [2021-02-13 15:45]: > > For example none of Super key bindings is used by Emacs. > > That makes alone possibly 7000-10000 possible combinations. > > Unheard of. How about trying it? If s-a is prefix key, 26 letters + 26 upper case letters + 10 numbers plus 32 symbols on my keyboard is 94 combinations multiplied by 94 possible other following keys, not counting possible middle suffix keys, yields ations is 8836 possible bindings with Super key on this keyboard. Make s-a prefix key: s-a a s-a b s-a 1 s-a 2 s-a ! etc. Make s-A prefix key: s-A a s-A b s-A 1 s-A 2 s-A ! etc. Then continue for each key as prefix key and multiply by other combinations. I think 8836 minimum is here. International keyboards could have more than that. Example binding that works: (global-set-key (kbd "s-U u") (lambda () (interactive) (message "Hello"))) Then if we add combinations with Control on my keyboard that becomes 94 x 94 x 94 with Control, so there are 830584 possible key bindings by using Super key and Super combined with Control key. Example binding: (global-set-key (kbd "C-s-b i") (lambda () (interactive) (message "Hello"))) Super can be combined with Meta or Alternative key. So that adds another multiplication by 94 and we end up with 78,074,896 possible key bindings that use Super key. Example bindings: (global-set-key (kbd "M-s-b b") (lambda () (interactive) (message "Hello"))) (global-set-key (kbd "M-s-b C-s-c") (lambda () (interactive) (message "Hello"))) (global-set-key (kbd "M-s-b M-s-7") (lambda () (interactive) (message "Hello"))) If we then make the second key also prefix the number of possible bindings grows and grows. If my calculation is wrong, then please make your own calculation and make cross checks to verify it and post it here. As currently we have situation that some people will say that Super often collides with Window Manager, but is that often more than 94 combinations by 94 combinations? If s-p collides then maybe s-; does not. If s-; is prefix key that alone opens 94 possible combinations on this keyboard. If I wish I could use a middle prefix key in that combination and get 8836 combinations. Example where s-; a is prefix key: (global-set-key (kbd "s-; a 1") (lambda () (interactive) (message "Hello"))) (global-set-key (kbd "s-; a 2") (lambda () (interactive) (message "Hello"))) (global-set-key (kbd "s-; a 3") (lambda () (interactive) (message "Hello"))) (global-set-key (kbd "s-; b 1") (lambda () (interactive) (message "Hello"))) (global-set-key (kbd "s-; B 1") (lambda () (interactive) (message "Hello there"))) The demonstration is there to show that combinations are more or less endless. I have no problem using s-; B 1 or remembering it. It is nothing less usable than C-x 5 0 or similar known commands. C-x 8 ' U gives me in Emacs = Ú -- so if I need that I will remember. I often use C-x 8 L to specify pounds as money symbol like £200 and I remember it. Personally I use C-x 7 as prefix for years already. C-x 9 is also free. Problem is in console, but maybe that problem can be solved. What you think how to solve Super key in console? Maybe kernel developers need to be contacted? We justdid not find how. That it can be solved is already clear as Super does work in X, so detection will work in console but it could be that it was tradiitonally just forgotten. Virtually all users have today Super key. If they change it in kernel then Super key becomes really super. Jean