Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1265879 > unrolled thread

Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order

Started byRimas Kudelis <rimas@kudelis.lt>
First post2025-10-13 09:10 +0200
Last post2025-10-16 02:00 +0200
Articles 8 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Rimas Kudelis <rimas@kudelis.lt> - 2025-10-13 09:10 +0200
    Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Samuel Thibault <sthibault@debian.org> - 2025-10-14 23:10 +0200
      Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Samuel Thibault <sthibault@debian.org> - 2025-10-14 23:20 +0200
        Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Samuel Thibault <sthibault@debian.org> - 2025-10-15 00:20 +0200
      Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Rimas Kudelis <rimas@kudelis.lt> - 2025-10-15 08:10 +0200
        Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Samuel Thibault <sthibault@debian.org> - 2025-10-15 09:10 +0200
          Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Rimas Kudelis <rimas@kudelis.lt> - 2025-10-15 12:50 +0200
            Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order Samuel Thibault <sthibault@debian.org> - 2025-10-16 02:00 +0200

#1265879 — Bug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order

FromRimas Kudelis <rimas@kudelis.lt>
Date2025-10-13 09:10 +0200
SubjectBug#1117976: console-setup: Keyboard level 4 remains locked if AltGr and Shift are released in incorrect order
Message-ID<LFkQW-4Py6-13@gated-at.bofh.it>
Package: console-setup
Version: 1.240
Severity: important

Dear Maintainer,

When freshly installing Debian 13, I have configured it to use 
Lithuanian keymap at startup. A secondary US keymap was also configured 
for me by default.

The Lithuanian keymap is similar to the US keymap, but replaces the 
characters in the top row with accented Lithuanian letters, moving 
digits to level 3 (AltGr) and special characters to level 4 
(AltGr+Shift).

When I tried using text terminal yesterday, I noticed that Level 4 tends 
to lock if I don't pay close attention to how I use it. For example, to 
enter &&, I need to use level 4. So if I enter it by pressing AltGr, 
then Shift, then pressing and releasing key 7 (twice), then releasing 
Shift, then releasing AltGr, all seems fine.

However, if I release AltGr before Shift (as I normally do), Level 4 
remains in effect, and I couldn't find a way to get out of it other than 
pressing ^C to cancel the command I was typing and logging out of the 
affected console by pressing ^D.

I believe this might be considered an important/major bug, because it 
impedes console usage in a major way and is probably not configurable 
separately from the X11/Wayland keymap, which is all done as a part of 
the normal setup experience.

Cheers,
Rimas

-- System Information:
Debian Release: 13.1
   APT prefers stable-updates
   APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.48+deb13-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=lt_LT.UTF-8, LC_CTYPE=lt_LT.UTF-8 (charmap=UTF-8), LANGUAGE 
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages console-setup depends on:
ii  console-setup-linux     1.240
ii  debconf [debconf-2.0]   1.5.91
ii  keyboard-configuration  1.240
ii  xkb-data                2.42-1

console-setup recommends no packages.

Versions of packages console-setup suggests:
ii  locales                    2.41-12
ii  sysvinit-utils [lsb-base]  3.14-4

Versions of packages keyboard-configuration depends on:
ii  debconf [debconf-2.0]   1.5.91
ii  liblocale-gettext-perl  1.07-7+b1
ii  xkb-data                2.42-1

Versions of packages console-setup-linux depends on:
ii  init-system-helpers     1.69~deb13u1
ii  kbd                     2.7.1-2
ii  keyboard-configuration  1.240

console-setup-linux suggests no packages.

Versions of packages console-setup is related to:
pn  console-common        <none>
pn  console-data          <none>
pn  console-tools         <none>
ii  gnome-control-center  1:48.4-1~deb13u1
ii  kbd                   2.7.1-2
ii  systemd               257.8-1~deb13u2

-- debconf information:
   keyboard-configuration/unsupported_options: true
   keyboard-configuration/unsupported_config_layout: true
* keyboard-configuration/switch: No temporary switch
   console-setup/charmap47: UTF-8
* keyboard-configuration/optionscode: 
grp:alt_shift_toggle,grp_led:scroll
   console-setup/fontsize-text47: 8x16
   keyboard-configuration/unsupported_config_options: true
   debian-installer/console-setup-udeb/title:
   keyboard-configuration/ctrl_alt_bksp: false
   keyboard-configuration/unsupported_layout: true
* keyboard-configuration/layoutcode: lt,us
   console-setup/fontface47: Fixed
* keyboard-configuration/xkb-keymap: lt
   console-setup/guess_font:
* keyboard-configuration/layout:
   console-setup/fontsize: 8x16
   console-setup/use_system_font:
   console-setup/framebuffer_only:
* keyboard-configuration/modelcode: pc105
   console-setup/store_defaults_in_debconf_db: true
* keyboard-configuration/compose: No compose key
* keyboard-configuration/model: Įprastinė PC 105 klavišų
* keyboard-configuration/variantcode: ,altgr-intl
* keyboard-configuration/toggle: Alt+Shift
* keyboard-configuration/store_defaults_in_debconf_db: true
   console-setup/fontsize-fb47: 8x16
* keyboard-configuration/variant: Lietuvių
* keyboard-configuration/other:
* keyboard-configuration/altgr: The default for the keyboard layout
   console-setup/codesetcode: Lat7
   console-setup/codeset47: # Latin7 - Lithuanian; Latvian; Maori and 
Marshallese

[toc] | [next] | [standalone]


#1266134

FromSamuel Thibault <sthibault@debian.org>
Date2025-10-14 23:10 +0200
Message-ID<LFUrn-5e1k-1@gated-at.bofh.it>
In reply to#1265879
Hello,

Rimas Kudelis, le lun. 13 oct. 2025 09:41:08 +0300, a ecrit:
> When I tried using text terminal yesterday, I noticed that Level 4 tends to
> lock if I don't pay close attention to how I use it. For example, to enter
> &&, I need to use level 4. So if I enter it by pressing AltGr, then Shift,
> then pressing and releasing key 7 (twice), then releasing Shift, then
> releasing AltGr, all seems fine.
> 
> However, if I release AltGr before Shift (as I normally do), Level 4 remains
> in effect, and I couldn't find a way to get out of it other than pressing ^C
> to cancel the command I was typing and logging out of the affected console
> by pressing ^D.

It seems there is some conflicting between the alt-shift toggle (which
also makes altgr-shift perform the toggle) and the altgr group3/4
processing.

> * keyboard-configuration/optionscode: grp:alt_shift_toggle,grp_led:scroll

Could you try to change in /etc/default/keyboard:

XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"

into

XKBOPTIONS="grp:lalt_lshift_toggle,grp_led:scroll"

(two additional 'l' to enable only alt-shift and not altgr-shift)

I'll commit something to make keyboard-configuration automatically set
this.

Samuel

[toc] | [prev] | [next] | [standalone]


#1266135

FromSamuel Thibault <sthibault@debian.org>
Date2025-10-14 23:20 +0200
Message-ID<LFUB4-5e57-11@gated-at.bofh.it>
In reply to#1266134
Samuel Thibault, le mar. 14 oct. 2025 22:59:31 +0200, a ecrit:
> Rimas Kudelis, le lun. 13 oct. 2025 09:41:08 +0300, a ecrit:
> XKBOPTIONS="grp:lalt_lshift_toggle,grp_led:scroll"
> 
> (two additional 'l' to enable only alt-shift and not altgr-shift)
> 
> I'll commit something to make keyboard-configuration automatically set
> this.

Looking more into it, it's really not easy. We cannot easily know
whether the layout will include level3(ralt_switch), and so if ralt will
be allocated to something.

The base problem is that we have a default configuration that leads to
a conflicting request: ralt+rshift to toggle group, and ralt to switch
level3.

I'm thinking that the default configuration should only enable
lalt+lshift for toggling group, so that ralt+rshift can either remain
the default Meta_R or level3 switch, depending on the layout, without
conflicting with group toggle. That way, only people explictly
requesting alt+shift (i.e. both lalt+lshift) will risk getting the
conflict if they don't realize that it conflicts with they level3
switch.

Samuel

[toc] | [prev] | [next] | [standalone]


#1266139

FromSamuel Thibault <sthibault@debian.org>
Date2025-10-15 00:20 +0200
Message-ID<LFVx7-5eJD-1@gated-at.bofh.it>
In reply to#1266135
Samuel Thibault, le mar. 14 oct. 2025 23:18:28 +0200, a ecrit:
> Samuel Thibault, le mar. 14 oct. 2025 22:59:31 +0200, a ecrit:
> > Rimas Kudelis, le lun. 13 oct. 2025 09:41:08 +0300, a ecrit:
> > XKBOPTIONS="grp:lalt_lshift_toggle,grp_led:scroll"
> > 
> > (two additional 'l' to enable only alt-shift and not altgr-shift)
> > 
> > I'll commit something to make keyboard-configuration automatically set
> > this.
> 
> Looking more into it, it's really not easy. We cannot easily know
> whether the layout will include level3(ralt_switch), and so if ralt will
> be allocated to something.
> 
> The base problem is that we have a default configuration that leads to
> a conflicting request: ralt+rshift to toggle group, and ralt to switch
> level3.
> 
> I'm thinking that the default configuration should only enable
> lalt+lshift for toggling group,

I have pushed it to master, for people to try out before we upload.

Samuel

> so that ralt+rshift can either remain
> the default Meta_R or level3 switch, depending on the layout, without
> conflicting with group toggle. That way, only people explictly
> requesting alt+shift (i.e. both lalt+lshift) will risk getting the
> conflict if they don't realize that it conflicts with they level3
> switch.

[toc] | [prev] | [next] | [standalone]


#1266172

FromRimas Kudelis <rimas@kudelis.lt>
Date2025-10-15 08:10 +0200
Message-ID<LG2RX-5jPq-5@gated-at.bofh.it>
In reply to#1266134
>> * keyboard-configuration/optionscode: 
>> grp:alt_shift_toggle,grp_led:scroll
> 
> Could you try to change in /etc/default/keyboard:
> 
> XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"
> 
> into
> 
> XKBOPTIONS="grp:lalt_lshift_toggle,grp_led:scroll"
> 
> (two additional 'l' to enable only alt-shift and not altgr-shift)

Thanks! I've changed this and will see how it works after reboot.


I do think it would make sense to allow both Shift keys, but only left 
Alt though. If anything, for accessibility reasons at least.

I also wonder if the combination of grp:alt_shift_toggle and level3/4 
shift on AltGr works differently in X/Wayland.

Cheers!

[toc] | [prev] | [next] | [standalone]


#1266187

FromSamuel Thibault <sthibault@debian.org>
Date2025-10-15 09:10 +0200
Message-ID<LG3O2-5krX-1@gated-at.bofh.it>
In reply to#1266172
Rimas Kudelis, le mer. 15 oct. 2025 08:20:44 +0300, a ecrit:
> > > * keyboard-configuration/optionscode:
> > > grp:alt_shift_toggle,grp_led:scroll
> > 
> > Could you try to change in /etc/default/keyboard:
> > 
> > XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"
> > 
> > into
> > 
> > XKBOPTIONS="grp:lalt_lshift_toggle,grp_led:scroll"
> > 
> > (two additional 'l' to enable only alt-shift and not altgr-shift)
> 
> Thanks! I've changed this and will see how it works after reboot.

You don't need to reboot, you can just run setupcon to apply the change.

> I do think it would make sense to allow both Shift keys, but only left Alt
> though.

That option does not exist in xkb-data.

> I also wonder if the combination of grp:alt_shift_toggle and level3/4 shift
> on AltGr works differently in X/Wayland.

It does work, but only by chance because the low-level engine is
different.

Samuel

[toc] | [prev] | [next] | [standalone]


#1266210

FromRimas Kudelis <rimas@kudelis.lt>
Date2025-10-15 12:50 +0200
Message-ID<LG7eV-5mBF-3@gated-at.bofh.it>
In reply to#1266187
2025-10-15 10:01, Samuel Thibault rašė:
> Rimas Kudelis, le mer. 15 oct. 2025 08:20:44 +0300, a ecrit:
>> > > * keyboard-configuration/optionscode:
>> > > grp:alt_shift_toggle,grp_led:scroll
>> >
>> > Could you try to change in /etc/default/keyboard:
>> >
>> > XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"
>> >
>> > into
>> >
>> > XKBOPTIONS="grp:lalt_lshift_toggle,grp_led:scroll"
>> >
>> > (two additional 'l' to enable only alt-shift and not altgr-shift)
>> 
>> Thanks! I've changed this and will see how it works after reboot.
> 
> You don't need to reboot, you can just run setupcon to apply the 
> change.

I ended up rebooting. I don't know if pressing Ctrl+C in a terminal I 
haven't logged in into should trigger this, but I played with my 
keyboard after changing the setting (including pressing Ctrl+C), and 
eventually even that shortcut stopped working, as well as Ctrl+Alt+Fx. 
Ctrl+Alt+Del ended up being my savior.

>> I also wonder if the combination of grp:alt_shift_toggle and level3/4 
>> shift
>> on AltGr works differently in X/Wayland.
> 
> It does work, but only by chance because the low-level engine is
> different.

I see. Good thing I usually use Win+Space to switch between 
keymaps/input methods. Maybe it would make sense for console-setup in 
Debian to default to grp:win_space_toggle as well?

Cheers, and thank you for your help!

Rimas

[toc] | [prev] | [next] | [standalone]


#1266269

FromSamuel Thibault <sthibault@debian.org>
Date2025-10-16 02:00 +0200
Message-ID<LGjzr-5v26-7@gated-at.bofh.it>
In reply to#1266210
Rimas Kudelis, le mer. 15 oct. 2025 13:47:23 +0300, a ecrit:
> 2025-10-15 10:01, Samuel Thibault rašė:
> > Rimas Kudelis, le mer. 15 oct. 2025 08:20:44 +0300, a ecrit:
> > > > > * keyboard-configuration/optionscode:
> > > > > grp:alt_shift_toggle,grp_led:scroll
> > > >
> > > > Could you try to change in /etc/default/keyboard:
> > > >
> > > > XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"
> > > >
> > > > into
> > > >
> > > > XKBOPTIONS="grp:lalt_lshift_toggle,grp_led:scroll"
> > > >
> > > > (two additional 'l' to enable only alt-shift and not altgr-shift)
> > > 
> > > Thanks! I've changed this and will see how it works after reboot.
> > 
> > You don't need to reboot, you can just run setupcon to apply the change.
> 
> I ended up rebooting. I don't know if pressing Ctrl+C in a terminal I
> haven't logged in into should trigger this, but I played with my keyboard
> after changing the setting (including pressing Ctrl+C), and eventually even
> that shortcut stopped working, as well as Ctrl+Alt+Fx. Ctrl+Alt+Del ended up
> being my savior.

That doesn't seem like it could be related with the change to
lalt_lshift_toggle. I have no idea what could have happened, it's not
supposed to anyway.

> > > I also wonder if the combination of grp:alt_shift_toggle and
> > > level3/4 shift
> > > on AltGr works differently in X/Wayland.
> > 
> > It does work, but only by chance because the low-level engine is
> > different.
> 
> I see. Good thing I usually use Win+Space to switch between keymaps/input
> methods. Maybe it would make sense for console-setup in Debian to default to
> grp:win_space_toggle as well?

I don't think we want to change a default without polling people on a
larger scale (I don't know how the current default was determined, but
the description seems to say it was not chosen randomly).

Samuel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web