Capital w no longer typable in foot #407

Closed
opened 7 months ago by cherti · 13 comments
cherti commented 7 months ago

a5b554761a introduces a regression that makes it impossible in my foot installation to type capital W. When typing Shift+w, simply nothing happens. Other keys seem fine, I haven't scanned the entirety of the keyboard though.

I can't find anything where I would have Shift+w mapped to something in the config.

I do get warnings in foot 1.7.0-2 that read:

warn: input.c:472: Shift+Prior: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with x
warn: input.c:472: Shift+Next: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with w
warn: input.c:472: Shift+Insert: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with adiaeresis
warn: input.c:472: Shift+Insert: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with adiaeresis
`a5b554761a` introduces a regression that makes it impossible in my foot installation to type capital W. When typing Shift+w, simply nothing happens. Other keys seem fine, I haven't scanned the entirety of the keyboard though. I can't find anything where I would have Shift+w mapped to something in the config. I do get warnings in foot 1.7.0-2 that read: ``` warn: input.c:472: Shift+Prior: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with x warn: input.c:472: Shift+Next: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with w warn: input.c:472: Shift+Insert: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with adiaeresis warn: input.c:472: Shift+Insert: combo with both explicit modifier and shifted symbol (level=5, mod-mask=0x00000021), replacing with adiaeresis ```
Poster

Now, why is this happening? It would seem like the keyboard layout indicates Next and w are on the same physical key. Is this correct?

Yes, indeed, with modifiers, though.

https://www.neo-layout.org/ here one can see that on Layer 4 the physical key of w changes to what I think is Next

> Now, why is this happening? It would seem like the keyboard layout indicates Next and w are on the same physical key. Is this correct? Yes, indeed, with modifiers, though. https://www.neo-layout.org/ here one can see that on Layer 4 the physical key of `w` changes to what I think is `Next`
Poster

And consequentially, capital X is broken as well indeed.

And Shift+Next and Shift+Prev are indeed bound to scroll-up and -down.

And consequentially, capital X is broken as well indeed. And Shift+Next and Shift+Prev are indeed bound to scroll-up and -down.
Owner

What physical keys do you press to get Shift+Next and Shift+w respectively?

Or is Shift+Next something you've never tried/used in foot before?

What physical keys do you press to get <kbd>Shift</kbd>+<kbd>Next</kbd> and <kbd>Shift</kbd>+<kbd>w</kbd> respectively? Or is <kbd>Shift</kbd>+<kbd>Next</kbd> something you've never tried/used in foot before?
Poster

In fact I typically press Shift+physical_PgUp, which has a dedicated key on my keyboards.

Alternatively, I should be able to press Shift+AltGr+w, AltGr+w should become Next in this combination. However, I have never used that in practice and just noticed that this actually doesn't work in foot 1.6.4, which I'm currently on. Apparently due to me having physical PgUp and PgDown-Keys I have never tried the Layer-4-Pg{up,down}s.

In fact I typically press Shift+physical_PgUp, which has a dedicated key on my keyboards. Alternatively, I should be able to press Shift+AltGr+w, AltGr+w should become Next in this combination. However, I have never used that in practice and just noticed that this actually doesn't work in foot 1.6.4, which I'm currently on. Apparently due to me having physical PgUp and PgDown-Keys I have never tried the Layer-4-Pg{up,down}s.
Owner

However, I have never used that in practice and just noticed that this actually doesn't work in foot 1.6.4, which I'm currently on

That's what I suspected.

The default for scrollback-up/down-page should be Shift+Page_Up/Down. Did you change the default bindings? (Or is XKB giving us different names, Next and Prior, for the same keys...)

> However, I have never used that in practice and just noticed that this actually doesn't work in foot 1.6.4, which I'm currently on That's what I suspected. The default for `scrollback-up/down-page` should be <kbd>Shift</kbd>+<kbd>Page_Up/Down</kbd>. Did you change the default bindings? (Or is XKB giving us different names, <kbd>Next</kbd> and <kbd>Prior</kbd>, for the same keys...)
Poster

Nope, I haven't explicitly configured that, hence it should be the default binding.

(scrollback-up-page and -down- are explicitly commented out in my config (as I have copied it from the default config and never changed it).)

Nope, I haven't explicitly configured that, hence it should be the default binding. (`scrollback-up-page` and `-down-` are explicitly commented out in my config (as I have copied it from the default config and never changed it).)
Owner

Ok, so what we have is a couple of default bindings, that doesn't (and never has) worked with this layout.

Now, foot is trying to "repair" it, and ends up breaking capital X and W instead. What to do?

In a sense, it is doing the right thing; taking a non-working key binding and making it work (assuming you now can use Shift+w to scroll up/down in the scrollback history). But it certainly isn't what you'd expect. In this particular case.

We can't really not repair key bindings, since older versions of foot required key bindings with Shift to be upper cased (e.g. Shift+W), whereas now they must be in lower case (e.g. Shift+w). Or just W (upper case) also works.

Given that the neo layout isn't a standard layout, perhaps documenting this in e.g. the wiki is enough?

I would assume that explicitly disabling these bindings, by setting scrollback-up/down-page=none makes Shift+w work again? But that it also breaks your normal Shift+Page_Up/Down combos?

Ok, so what we have is a couple of default bindings, that doesn't (and never has) worked with this layout. Now, foot is trying to "repair" it, and ends up breaking capital `X` and `W` instead. What to do? In a sense, it is doing the right thing; taking a non-working key binding and making it work (assuming you now can use <kbd>Shift</kbd>+<kbd>w</kbd> to scroll up/down in the scrollback history). But it certainly isn't what you'd expect. In this particular case. We can't really _not_ repair key bindings, since older versions of foot **required** key bindings with <kbd>Shift</kbd> to be upper cased (e.g. `Shift+W`), whereas now they **must** be in lower case (e.g. `Shift+w`). Or just `W` (upper case) also works. Given that the neo layout isn't a standard layout, perhaps documenting this in e.g. the wiki is enough? I would assume that explicitly disabling these bindings, by setting `scrollback-up/down-page=none` makes <kbd>Shift</kbd>+<kbd>w</kbd> work again? But that it also breaks your normal <kbd>Shift</kbd>+<kbd>Page_Up/Down</kbd> combos?
Owner

Alternatively, I should be able to press Shift+AltGr+w, AltGr+w should become Next

Hmm, right, so Shift is in fact not needed at all to produce Next?

If so, that means we should be able to fine tune the repair logic in foot.

> Alternatively, I should be able to press Shift+AltGr+w, AltGr+w should become Next Hmm, right, so <kbd>Shift</kbd> is in fact not needed at all to produce <kbd>Next</kbd>? If so, that means we should be able to fine tune the repair logic in foot.
Poster

assuming you now can use Shift+w to scroll up/down in the scrollback history

Which in fact I can't, neither with Shift+w, nor with Shift+AltGr+w.

Furthermore, this in fact would mean that I cannot map any keys that are on that layer, which includes Insert, Backspace, End, Delete, among others in foot at all.

Ok, so what we have is a couple of default bindings, that doesn't (and never has) worked with this layout.

That is incorrect. Shift+PgUp is perfectly functional when used with the physical PgUp-Key.

However, in this constellation, we have an effectively dead Shift+w, working neither as W nor as Shift+PgUp.

Given that the neo layout isn't a standard layout

Now that highly depends on your definition of "standard". It is included in the default layouts on all Linux Distributions I know and available without further installation, I would suspect for a reason. In fact do I know quite a number of people who use it by default due to its significant increase in ergonomics.

> assuming you now can use Shift+w to scroll up/down in the scrollback history Which in fact I can't, neither with Shift+w, nor with Shift+AltGr+w. Furthermore, this in fact would mean that I cannot map any keys that are on that layer, which includes Insert, Backspace, End, Delete, among others in foot at all. > Ok, so what we have is a couple of default bindings, that doesn't (and never has) worked with this layout. That is incorrect. Shift+PgUp is perfectly functional when used with the physical PgUp-Key. However, in this constellation, we have an effectively dead `Shift+w`, working neither as `W` nor as `Shift+PgUp`. > Given that the neo layout isn't a standard layout Now that highly depends on your definition of "standard". It is included in the default layouts on all Linux Distributions I know and available without further installation, I would suspect for a reason. In fact do I know quite a number of people who use it by default due to its significant increase in ergonomics.
Poster

Hmm, right, so Shift is in fact not needed at all to produce Next?

That is correct, AltGr+x in entirely sufficient. (In fact I confused the mappings, AltGr+x is Up and +w is Down, although that effectively doesn't change anything about the problem, just for completeness.)

> Hmm, right, so Shift is in fact not needed at all to produce Next? That is correct, `AltGr+x` in entirely sufficient. (In fact I confused the mappings, AltGr+x is Up and +w is Down, although that effectively doesn't change anything about the problem, just for completeness.)
Owner

I'm trying to test this layout, by setting xkb_layout de(neo) in my Sway config. And it is definitely using that layout, but I get no warnings from foot, and Shift+w works just fine...

I'm trying to test this layout, by setting `xkb_layout de(neo)` in my Sway config. And it is definitely using that layout, but I get no warnings from foot, and <kbd>Shift</kbd>+<kbd>w</kbd> works just fine...
Poster

huh, interesting. The exact setting I use is

input type:keyboard {
        xkb_layout de
        xkb_variant "neo"
        xkb_options "altwin:swap_lalt_lwin,grp:alt_shift_toggle"
}

Maybe the options change something?

huh, interesting. The exact setting I use is ``` input type:keyboard { xkb_layout de xkb_variant "neo" xkb_options "altwin:swap_lalt_lwin,grp:alt_shift_toggle" } ``` Maybe the options change something?
Owner

I'll have to put this on hold until tomorrow.

I think the problem is that we, in this case, is ignoring the fact that AltGr needs to be pressed to produce Next and Prior. Thus, switching out e.g. Next to w in a combo that does not include AltGr is wrong.

Put more generally; we need to verify the key combo explicitly lists all modifiers required to produce the symbol we're trying to un-shift.

I'll have to put this on hold until tomorrow. I _think_ the problem is that we, in this case, is ignoring the fact that <kbd>AltGr</kbd> needs to be pressed to produce <kbd>Next</kbd> and <kbd>Prior</kbd>. Thus, switching out e.g. <kbd>Next</kbd> to <kbd>w</kbd> in a combo that does **not** include <kbd>AltGr</kbd> is wrong. Put more generally; we need to verify the key combo explicitly lists **all** modifiers required to produce the symbol we're trying to un-shift.
dnkl added the
bug
label 7 months ago
dnkl closed this issue 7 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.