From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: Howto: Bind Windows key as a prefix? Date: Wed, 06 Jul 2022 00:37:53 +0600 Message-ID: <87mtdn9zi6.fsf@disroot.org> References: <25284.32832.471566.596874@google.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4791"; mail-complaints-to="usenet@ciao.gmane.io" To: "T.V Raman" , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 05 21:09:16 2022 Return-path: Envelope-to: ged-emacs-devel@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 1o8nv9-0000yi-9g for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Jul 2022 21:09:15 +0200 Original-Received: from localhost ([::1]:46216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8nv7-00059h-7t for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Jul 2022 15:09:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8nRp-0007v6-9O for emacs-devel@gnu.org; Tue, 05 Jul 2022 14:38:58 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:41272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8nRb-00045r-RP for emacs-devel@gnu.org; Tue, 05 Jul 2022 14:38:56 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8067340DC0; Tue, 5 Jul 2022 20:38:41 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BdXzqZ3bMFOE; Tue, 5 Jul 2022 20:38:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1657046319; bh=EDh23JhNcIuwU5PkzKz7tJHgW8mbT9Ck5tqGPseqdzE=; h=From:To:Subject:In-Reply-To:References:Date; b=PtKeN0gGyRJ66hWTObtckqVx1AHsUrp3lsrdfsBSwH6FjE4pYRX8T9hCyyaWSZa5C U9Ciwg0KHpJ1UakuE95stNS8z+UHF1O/Xk3u7Z04Kj/hvF7a5xZcjiyQIrcgkYZWy8 YMoe063K2e3wSKpyDSKi5YnUg02LrKQCfU2jTWII8Wqmp6TjSOKLSWjFw1nzi7phSs crFZjQyyf7FO9O70koTcXOXGqhGDJQSjtGj+6dlN91Ao0FsVKm9P6gq8u6b9w54WLf +7T5QLX8qpyLhCwIZfB/W6mA6CT5bNoMyHVLuPQnjqd8wTHv1zWzoBPT8+mvKlzbDf eYSLP/hIaY/0Q== In-Reply-To: <25284.32832.471566.596874@google.com> Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291885 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "T.V Raman" writes: > On my laptop, > pressing windows-key+ says=20 > s- is undefined for any . > > M-x global-set-key RET > windows+ RET > command RET > binds windows- > and asking where is shows it as being on s-. > > However calling global-set-key with "s-" bombs with key-sequence > "s-" starts with non-prefix s" > > Debugger entered--Lisp error: (error "Key sequence s - a starts with non-= prefix key s") > (define-key (keymap #^[nil nil keymap=20 > #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-specif= ic-command-prefix delete-char emacspeak-prefix-command forward-char keyboar= d-quit help-command indent-for-tab-command electric-newline-and-maybe-inden= t kill-line recenter-top-bottom newline next-line (keymap (32 . emacspeak-o= utline-speak-this-heading) (102 . emacspeak-outline-speak-forward-heading) = (98 . emacspeak-outline-speak-backward-heading) (110 . emacspeak-outline-sp= eak-next-heading) (112 . emacspeak-outline-speak-previous-heading) (111 . o= pen-line) (13 . outline-insert-heading) (67108926 . outline-demote) (671089= 24 . outline-promote) (22 . outline-move-subtree-down) (30 . outline-move-s= ubtree-up) (15 . outline-hide-other) (17 . outline-hide-sublevels) (11 . ou= tline-show-branches) (12 . outline-hide-leaves) (5 . outline-show-entry) (3= . outline-hide-entry) (1 . outline-show-all) (20 . outline-hide-body) (2 .= outline-backward-same-level) (6 . outline-forward-same-level) (21 . outlin= e-up-heading) (4 . outline-hide-subtree) (19 . outline-show-subtree) (9 . o= utline-show-children) (16 . outline-previous-visible-heading) (14 . outline= -next-visible-heading) (64 . outline-mark-subtree)) previous-line quoted-in= sert isearch-backward isearch-forward transpose-chars universal-argument sc= roll-up-command kill-region Control-X-prefix emacspeak-muggles-yank-pop/yan= k emacspeak-ctl-z-keymap ESC-prefix toggle-input-method abort-recursive-edi= t nil ...] #^^[1 0 #^^[2 0=20 > #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-specif= ic-command-prefix delete-char emacspeak-prefix-command forward-char keyboar= d-quit help-command indent-for-tab-command electric-newline-and-maybe-inden= t kill-line recenter-top-bottom newline next-line (keymap ... ... ... ... .= .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... = ... ... ... ... ...) previous-line quoted-insert isearch-backward isearch-f= orward transpose-chars universal-argument scroll-up-command kill-region Con= trol-X-prefix emacspeak-muggles-yank-pop/yank emacspeak-ctl-z-keymap ESC-pr= efix toggle-input-method abort-recursive-edit nil ...] self-insert-command = self-insert-command self-insert-command self-insert-command self-insert-com= mand self-insert-command self-insert-command self-insert-command self-inser= t-command self-insert-command self-insert-command self-insert-command self-= insert-command self-insert-command self-insert-command self-insert-command = self-insert-command self-insert-command self-insert-command self-insert-com= mand self-insert-command self-insert-command self-insert-command self-inser= t-command self-insert-command self-insert-command self-insert-command self-= insert-command self-insert-command self-insert-command ...] self-insert-com= mand self-insert-command self-insert-command self-insert-command self-inser= t-command self-insert-command self-insert-command self-insert-command self-= insert-command self-insert-command self-insert-command self-insert-command = self-insert-command self-insert-command self-insert-command] self-insert-co= mmand self-insert-command self-insert-command self-insert-command self-inse= rt-command self-insert-command self-insert-command self-insert-command self= -insert-command self-insert-command self-insert-command self-insert-command= self-insert-command self-insert-command self-insert-command self-insert-co= mmand self-insert-command self-insert-command self-insert-command self-inse= rt-command self-insert-command self-insert-command self-insert-command self= -insert-command self-insert-command self-insert-command self-insert-command= ...] (8388716 . ansi-term) (8388640 . emacspeak-muggles-maths-navigator/bo= dy) (8388718 . emacspeak-muggles-navigate/body) (print . emacspeak-muggles-= brightness/body) (f14 . kmacro-end-or-call-macro) (f13 . kmacro-start-macro= -or-insert-counter) (S-mouse-3 . kmacro-end-call-mouse) (C-S-iso-lefttab . = tab-previous) (C-S-tab . tab-previous) (C-tab . tab-next) (f5 . find-file) = (remap keymap (dabbrev-expand . hippie-expand)) (silence . emacspeak-silenc= e) (67108903 . emacspeak-multi-keymap) (67108923 . emacspeak-hyper-keymap) = (67108910 . emacspeak-super-keymap) (67108908 . emacspeak-alt-keymap) (S-do= wn . emacspeak-skip-blank-lines-forward) (S-up . emacspeak-skip-blank-lines= -backward) (S-right . next-buffer) (S-left . previous-buffer) (XF86AudioRai= seVolume . amixer-volume-up) (XF86AudioLowerVolume . amixer-volume-down) (C= -f2 . amixer-volume-down) (C-f1 . amixer-volume-up) (XF86AudioPlay . emacsp= eak-silence) (paste . clipboard-yank) (copy . clipboard-kill-ring-save) (cu= t . clipboard-kill-region) (f18 . clipboard-yank) ...) "s-a" ansi-term) > (#f(compiled-function (key command) "Give KEY a global binding as COMMA= ND.\nThis is a legacy function; see `keymap-global-set' for the\nrecommende= d function to use instead.\n\nCOMMAND is the command definition to use; usu= ally it is\na symbol naming an interactively-callable function.\nKEY is a k= ey sequence; noninteractively, it is a string or vector\nof characters or e= vent types, and non-ASCII characters with codes\nabove 127 (such as ISO Lat= in-1) can be included if you use a vector.\n\nNote that if KEY has a local = binding in the current buffer,\nthat local binding will continue to shadow = any global binding\nthat you make with this function." (interactive #f(comp= iled-function () #)) #) "s-a" ansi-term) > (ad-Advice-global-set-key #f(compiled-function (key command) "Give KEY = a global binding as COMMAND.\nThis is a legacy function; see `keymap-global= -set' for the\nrecommended function to use instead.\n\nCOMMAND is the comma= nd definition to use; usually it is\na symbol naming an interactively-calla= ble function.\nKEY is a key sequence; noninteractively, it is a string or v= ector\nof characters or event types, and non-ASCII characters with codes\na= bove 127 (such as ISO Latin-1) can be included if you use a vector.\n\nNote= that if KEY has a local binding in the current buffer,\nthat local binding= will continue to shadow any global binding\nthat you make with this functi= on." (interactive #f(compiled-function () #)) = #) "s-a" ansi-term) > (apply ad-Advice-global-set-key #f(compiled-function (key command) "Giv= e KEY a global binding as COMMAND.\nThis is a legacy function; see `keymap-= global-set' for the\nrecommended function to use instead.\n\nCOMMAND is the= command definition to use; usually it is\na symbol naming an interactively= -callable function.\nKEY is a key sequence; noninteractively, it is a strin= g or vector\nof characters or event types, and non-ASCII characters with co= des\nabove 127 (such as ISO Latin-1) can be included if you use a vector.\n= \nNote that if KEY has a local binding in the current buffer,\nthat local b= inding will continue to shadow any global binding\nthat you make with this = function." (interactive #f(compiled-function () #)) #) ("s-a" ansi-term)) > (global-set-key "s-a" ansi-term) > (eval (global-set-key "s-a" 'ansi-term) t) > (#f(compiled-function (exp &optional insert-value no-truncate char-prin= t-limit) "Evaluate EXP and print value in the echo area.\nWhen called inter= actively, read an Emacs Lisp expression and\nevaluate it. Value is also co= nsed on to front of the variable\n`values'. Optional argument INSERT-VALUE= non-nil (interactively,\nwith a non `-' prefix argument) means insert the = result into the\ncurrent buffer instead of printing it in the echo area.\n\= nNormally, this function truncates long output according to the\nvalue of t= he variables `eval-expression-print-length' and\n`eval-expression-print-lev= el'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument o= f zero), however,\nthere is no such truncation.\n\nIf the resulting value i= s an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given= a non-zero prefix argument)\nit will be printed in several additional form= ats (octal,\nhexadecimal, and character). The character format is used onl= y\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix ar= gument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-ch= aracter').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on ente= ring the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, wh= ich is the default,\nthis command arranges for all errors to enter the debu= gger." (interactive #f(compiled-function () #)= ) #) (global-set-key "s-a" 'ansi-term) nil nil= 127) > (ad-Advice-eval-expression #f(compiled-function (exp &optional insert-v= alue no-truncate char-print-limit) "Evaluate EXP and print value in the ech= o area.\nWhen called interactively, read an Emacs Lisp expression and\neval= uate it. Value is also consed on to front of the variable\n`values'. Opti= onal argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix a= rgument) means insert the result into the\ncurrent buffer instead of printi= ng it in the echo area.\n\nNormally, this function truncates long output ac= cording to the\nvalue of the variables `eval-expression-print-length' and\n= `eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively= , with a prefix argument of zero), however,\nthere is no such truncation.\n= \nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (i= nteractively, unless given a non-zero prefix argument)\nit will be printed = in several additional formats (octal,\nhexadecimal, and character). The ch= aracter format is used only\nif the value is below CHAR-PRINT-LIMIT (intera= ctively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-e= xpression-print-maximum-character').\n\nRuns the hook `eval-expression-mini= buffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debu= g-on-error' is non-nil, which is the default,\nthis command arranges for al= l errors to enter the debugger." (interactive #f(compiled-function () #)) #) (global-set-key= "s-a" 'ansi-term) nil nil 127) > (apply ad-Advice-eval-expression #f(compiled-function (exp &optional in= sert-value no-truncate char-print-limit) "Evaluate EXP and print value in t= he echo area.\nWhen called interactively, read an Emacs Lisp expression and= \nevaluate it. Value is also consed on to front of the variable\n`values'.= Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' pr= efix argument) means insert the result into the\ncurrent buffer instead of = printing it in the echo area.\n\nNormally, this function truncates long out= put according to the\nvalue of the variables `eval-expression-print-length'= and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interac= tively, with a prefix argument of zero), however,\nthere is no such truncat= ion.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-= nil (interactively, unless given a non-zero prefix argument)\nit will be pr= inted in several additional formats (octal,\nhexadecimal, and character). = The character format is used only\nif the value is below CHAR-PRINT-LIMIT (= interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`= eval-expression-print-maximum-character').\n\nRuns the hook `eval-expressio= n-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expressio= n-debug-on-error' is non-nil, which is the default,\nthis command arranges = for all errors to enter the debugger." (interactive #f(compiled-function ()= #)) #) ((global-= set-key "s-a" 'ansi-term) nil nil 127)) > (eval-expression (global-set-key "s-a" 'ansi-term) nil nil 127) > (# eval-expression (global-set-key "s-a" 'a= nsi-term) nil nil 127) > (apply # eval-expression ((global-set-key "= s-a" 'ansi-term) nil nil 127)) > (ad-Advice-funcall-interactively # eval-exp= ression (global-set-key "s-a" 'ansi-term) nil nil 127) > (apply ad-Advice-funcall-interactively # (e= val-expression (global-set-key "s-a" 'ansi-term) nil nil 127)) > (funcall-interactively eval-expression (global-set-key "s-a" 'ansi-term= ) nil nil 127) > (# eval-expression nil nil) > (apply # eval-expression (nil nil)) > (call-interactively@ido-cr+-record-current-command # eval-expression nil nil) > (apply call-interactively@ido-cr+-record-current-command # (eval-expression nil nil)) > (call-interactively eval-expression nil nil) > (command-execute eval-expression) > > --=20 > > Thanks, > > --Raman(I Search, I Find, I Misplace, I Research) > =E2=99=89 Id: kg:/m/0285kf1 =F0=9F=A6=AENZIr=05wH2+)!y=DC=84do9 Evaluating "(global-set-key "s-a" 'ansi-term)" won't work. Try evaluating "(global-set-key (kbd "s-a") 'ansi-term)". =2D-=20 Akib Azmain Turja This message is signed by me with my GnuPG key. It's fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmLEhQEACgkQVTX89U2I YWvEmg//cTuih49xM997BjIXli5Pd5fGXTD0lM+AQFFLoJZSo+Vy8IoESstIE8EW 3Xg5JGNquLQGMETiA/n8ZYp97nC1rOcOSdxuwxBYwy27HJox35nDgxNpMSTBCETn +7RLPo00eoLLqn3mUVF3Klq7iTEA7NFTTosoz7pa4FTd0z5YnFOkDdZ3eT/pExlg tN1IePOrR5Lzd0UkuVMjl+z6TeejwtxX19kV2+oEfrpoztKAnxhmwaOTFYimGweW +zGAJoS4vxSIU8Tc0u3MOJ6ZRXyYyqQTDZq+HvblvTqQoY+AjnL0mJB0qDnlK0/9 5jBljX1VBLNdWxAweIUcrcajMDzNzcw5nt31YkVQssMTp4SzUVEQo69MD4HoCC7+ j0jcCoWd2/0QpcvFHy6HIU4MHBjO7g3LOyM6TZaZ7xEYwwXu0+1JE6U2jmjf5Q1p i/9cYUhN200CT6LZAaCxXP8TiNMNP6issjWNdp4Dwg/BVjvLFPfaUWQSxe3tWD5E 11I7Ge/tk+9dU1JzH8ajihoiSEriOKztFHoW7HFRDRfY2GRZ5ef0bccuB3LC9CwG Xd0Y5x+fLAtQzXt/vHFTM1PsLLVrY2q/SHkmqHFIBCnxvi3LhUgloWaRnjDHeyAG 8Zr2HPmE4ax8Vi8wOTUR1ocpZgUri/qe9HTT3oE/G0E5ss0b7+U= =bwny -----END PGP SIGNATURE----- --=-=-=--