From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jon Eskin Newsgroups: gmane.emacs.help Subject: Remapping Windows key combinations to ctrl keybindings Date: Tue, 14 Nov 2023 07:47:16 -0500 Message-ID: <87sf58ijsb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23856"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 14 14:42:48 2023 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 1r2tgl-00065O-Tx for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 14 Nov 2023 14:42:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2tg7-0002tJ-2g; Tue, 14 Nov 2023 08:42:07 -0500 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 1r2sp6-00033S-7x for help-gnu-emacs@gnu.org; Tue, 14 Nov 2023 07:47:20 -0500 Original-Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2sp4-0001yz-Pe for help-gnu-emacs@gnu.org; Tue, 14 Nov 2023 07:47:20 -0500 Original-Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-677a0ac3797so20846336d6.1 for ; Tue, 14 Nov 2023 04:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699966037; x=1700570837; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=6TRiEb1Bcb4Si7a0+qEA/moH1g/ihDluWUnpWrL4akY=; b=caZKGTjlls0pD6hLWP/vipcy/wqJZ3avCsG2TYFZIeEpCdE/NplGjsQqFoKqj0y6aj DGEu0EL1cxJp9XDvTpuuFoRnCRU/3ltDlYWMkiN5k4+9rQOetgEMUPJ1zxckdM8VoBW+ wvJxOqH2twXsI/IX0z9OqLZtRCDYYIgr6PbNbPuIRzr90xu0f49/J0gDX/rBeuX8OKU+ c/TXvlsmqdpH6kJWxlsvYFuuExjkZCt0kRyzx7KcBv/MtgTywMHns+jnrR/K7Sp8JSBc kprFEo52fqlaiPbI6v/qXCE0bd5dJM8ouS0z3I4ekuxBwjIFMWal8rgEjy9E7p6kfQhd MaDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699966037; x=1700570837; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6TRiEb1Bcb4Si7a0+qEA/moH1g/ihDluWUnpWrL4akY=; b=oA454ldDkRVAfAFvmJ6qAKxJNPYsABwr0IUJLTHAc6bQgsQdgNb/Jhrxz1fzce17Tp VQBWFmUxDKO+XZzqcpK3ki4ZwF8QI+Vw5m/auNMDHfw2PQbpjM9DBqGlvlemBLP4BzHi aV/0Sp4K9tGCDkuW5hPspiu5HDghq3ZDCBUmd3nUUnt3nkU2BzEp185/oL0Dglkhuix6 UcPOyiMazLwKydBwqTV8UQ2+q+qOrGw+71lviiDa6KRDUgKdoScNJFm7o6xZSeOrp1Po O0EEBuLiCtjQwDF2VNNefJCh/94WGLhM6lpwwfHcobWAZ/ab04xfIwRoUh0qWu61xfhI EL/w== X-Gm-Message-State: AOJu0YwqzN3z2Rk2KJm6fu6hcWEyHAmpgODYo9T7g2Tw20hoZLD96Jng Vsxhhrhs+OXAVsmgy2WeCA97rUPJ71w= X-Google-Smtp-Source: AGHT+IFY9OWWeBG90hS2fG3vpNxPhDkOFL4zWzh0hALPXyRu65ymqM6G/HIWKWMC/LDPj/EP2pFNUA== X-Received: by 2002:a05:6214:16cc:b0:66d:1112:e870 with SMTP id d12-20020a05621416cc00b0066d1112e870mr2287887qvz.22.1699966037225; Tue, 14 Nov 2023 04:47:17 -0800 (PST) Original-Received: from Bell (pool-173-73-227-157.washdc.fios.verizon.net. [173.73.227.157]) by smtp.gmail.com with ESMTPSA id s8-20020ad45008000000b0067095b0c473sm2890798qvo.11.2023.11.14.04.47.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 04:47:16 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=eskinjp@gmail.com; helo=mail-qv1-xf33.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, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 14 Nov 2023 08:42:05 -0500 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:145527 Archived-At: On windows 10, I used to prevent the lwindow key from triggering its default behavior and remap it to ctrl with the following: (setq w32-pass-lwindow-to-system nil) (setq l-window-modifier 'ctrl) In windows 11, this approach is problematic as noted in the variable documentation for w32-pass-lwindow-to-system, which notes that combinations such as -r trigger the run dialog, even when the variable is set. I've found that if I set the following: (setq w32-lwindow-modifier 'super) (w32-register-hot-key [s-r]) (w32-register-hot-key [s-a]) It will prevent the key combinations assigned to -r and -a from occuring, and instead assign them to whatever is bound to the s-r and s-a keybindings. However, I'm trying to assign them to the control keybindings, but the following doesn't work like I hoped: (setq w32-lwindow-modifier 'ctrl) (w32-register-hot-key [C-r]) (w32-register-hot-key [C-a]) Is there any way to disable these key combinations and use the control keybindings?