Unbinding Alt-1 Does Not Work
Pavel Sanda
sanda at lyx.org
Tue Jun 4 08:14:57 UTC 2024
On Mon, Jun 03, 2024 at 09:43:15PM -0400, Richard Kimberly Heck wrote:
> On 6/3/24 16:34, Richard Kimberly Heck wrote:
> > On 6/3/24 15:55, Richard Kimberly Heck wrote:
> > > A user reported that many of his custom shortcuts were not working.
> > > These used Alt-1, etc, as a prefix (e.g., Alt-1 M). Because 2.4 now
> > > binds Alt-NUM to "Save bookmark NUM", that is not a surprise. What
> > > is a surprise is that it does not seem possible to unbind this. Even
> > > if I unbind Alt-9, say, it still saves bookmark 9.
> > >
> > > Using -dbg kbmap does not give any useful information. Unbinding
> > > does not seem to generate any messages.
> >
> > The problem seems to be that the binding is declared as:
> >
> > M-~S-9
> >
> > rather than:
> >
> > M-9
> >
> > If I change it to the latter, then I can unbind it. So the unbinding
> > routine is failing to deal with the 'ignore' case. I.e., M-9 does not
> > match M-~S-9, so it thinks there's nothing to unbind. And it shows as
> > just M-9 in Tools> Preferences, and that's what it writes to the
> > user.bind file.
> >
> > It seems to me we should just go ahead and unbind in that case, whether
> > the 'ignore' part matches or not. Thoughts?
Sorry for my ignorance, what is the '~' in ~S supposed to mean?
Ignore Shift state?
I see we use it like crazy in aqua.bind and bunch of other places.
> Having looked some at the code, it appears that 'ignore' sequences, like
> M-~S-9, do not really get considered in the shortcut machinery. They do not
> get displayed in the GUI, or written to the bind files. (See
> KeySequence::print.)
>
> I would suggest we remove the ~S from the bookmark shortcuts. I don't see
> that it's needed. Longer term, something more needs to be done to the
> shortcut machinery.
If it does not work why not remove it eveywhere? No one will notice.
Or you propose to make it work in the long term?
I just tried C-S-1 (C-~S-1 hooked to bookmark-goto 1) and it does not
work on linux. Only C-1 works here.
Pavel
More information about the lyx-devel
mailing list