[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60101: 29.0.60; help-quick should use C-/ for undo
From: |
Philip Kaludercic |
Subject: |
bug#60101: 29.0.60; help-quick should use C-/ for undo |
Date: |
Sat, 17 Dec 2022 18:04:47 +0000 |
Juri Linkov <juri@linkov.net> writes:
>>> In lisp/bindings.el its preferred binding is defined by this line:
>>>
>>> (put 'undo :advertised-binding [?\C-x ?u])
>>
>> That is good, but it only solves the problem by providing the means.
>> The other issue is figuring out how the advertised binding can
>> automatically be set to whatever is preferred on the current system. Is
>> there a way to find out what keyboard layout is being used, or at least
>> what modifiers have to be pressed for a key to be input?
>
> If a key would be unbound on a tty, this could help to exclude it
> from the preferred keybindings. For example, if C-/ was unbound
> depending on a tty type, then this would fall back to 'C-x u':
>
> (put 'undo :advertised-binding '([?\C-/] [?\C-x ?u]))
>
> But otherwise, could you formulate a clear criteria for excluding
> some keys from the set of preferred keys? Do you know how to
> query the current keyboard layout, or to find the preferred modifiers?
No, I don't know. What I had in mind was a sort of ordering to find the
key with the fewest modifiers, depending on the keyboard layout.