From unknown Sat Aug 16 23:50:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46157: specific key detection prevents generic recognition of Ctrl+Backarrow in modifyOtherKeys mode Resent-From: Thomas Wolff Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jan 2021 17:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46157 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 46157@debbugs.gnu.org X-Debbugs-Original-To: submit@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161185524521120 (code B ref -1); Thu, 28 Jan 2021 17:35:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jan 2021 17:34:05 +0000 Received: from localhost ([127.0.0.1]:49950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5BBE-0005Ua-Sy for submit@debbugs.gnu.org; Thu, 28 Jan 2021 12:34:05 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:46531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5BBC-0005U3-Nm for submit@debbugs.gnu.org; Thu, 28 Jan 2021 12:34:04 -0500 Received: from [192.168.178.72] ([91.65.218.78]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MAOeB-1lFsYz22Xr-00BsO4 for ; Thu, 28 Jan 2021 18:33:54 +0100 From: Thomas Wolff Message-ID: <63e7142f-bc8a-72ed-bbc9-4455c0518515@computer.org> Date: Thu, 28 Jan 2021 18:33:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:jOGZ1lPx0HY4eTQ1W35XP2GscFrGqYR33jO+2gWwZBA/Wq8VJVs ZF9RpgTWzDfn2BrKsUiixXWav2DNXdshWHmaJmBcDzw4U0l0v/xJtBat/aq8uD41MtPJhG/ N0q48+a6UDf93drIWH+sqeVH/JKq9v8OzWcuks1oRzk2RY9YxiTqh4aN2YkWAVTtb/tPKK8 sIFHRswziSuhwNQ1u0VJA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:5ccXeNfbEg4=:XzX3fWUPknY9Ni0QutxHh9 WC3DDYEMCU1enwve1AbRmGyp9fzVFoDc1ZsomesvcYymfXlzH5+CDnAAJO131RFkVU/YV7WHO RHeUIGvzUlluHyGpp+120XMpEj4EerfTIC9RfilXhNEbNkkJ2nl7/DjZ+LRIHMY10KYlgeJrS qRjQxs/+uaZQsHDzxPEkxGDTo2Csyxf4PPow70KJj9snonyrRJo5hJ6VrBBXUNaz1cyDcqpy0 IFOJ7Q4juh36ybLNzRw4i5WwmrrXx5YV6WrrA00KZ+QYOJbq22EKb7EmBWMRxjW0yrJOO4n5q MPSdo90VyYlzWLAp2qxAO+qU1biBr0R1BQ9cjLRijDVy7reG8z7QB7YuGnLAXeGBUp9+E3VUn BWXHofQLN3cuNAAT6fkj1a3/K2xOY17XwpJwPNFlfspNdDyel2EaJCNjQhCOxxVcSEHLgoOln KIewrmzKJQ== X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Package: emacs Version: 27.1 In text mode, emacs uses modifyOtherKeys mode (as introduced by xterm) to distinguish non-character modifier+key combinations. However, some terminals (e.g. mintty) may implement a slightly extended version of modifyOtherKeys mode. Mintty uses it also for Ctrl+Backarrow (which xterm doesn't), so this combination will not be recognised by emacs, and rather garbage (partial escape sequence) will be entered. Ref: mintty issue https://github.com/mintty/mintty/issues/1082#issuecomment-769021784 Suggestion: emacs should apply generic detection of modifyOtherKeys mode escape sequences, so that all of them will be interpreted properly. Ctrl+Backarrow (where Backarrow is mapped to DEL) may be a special case as Ctrl+DEL may not have a meaning in emacs, so the typical remapping to Backspace should be applied in this case. Vice versa for the case that Backarrow is mapped to Backspace. Note: browsing emacs docs and help pages, I could not find out whether a workaround is possible, something like (global-set-key "\e[127;5u" ...) which does not work. Some notes on how to rebind unknown escape sequences should be added; in case that's not possible, the functionality should be added.