Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-29 Thread Tollef Fog Heen
]] Gunnar Hjalmarsson 

> On 2023-08-28 13:42, Tollef Fog Heen wrote:
> > ]] Gunnar Hjalmarsson
> > 
> >> What's the output of this command:
> >>
> >> gsettings get org.gnome.desktop.input-sources xkb-options
> > $ gsettings get org.gnome.desktop.input-sources xkb-options
> > ['compose:caps', 'compose:caps', 'grp:alts_toggle', 'lv3:ralt_switch']
> 
> Then run this command:
> 
> gsettings set org.gnome.desktop.input-sources xkb-options "['compose:caps']"

That made the problem go away, but it doesn't really answer how it ended
up there in the first place, though.  I suspect this is something that's
carried from older versions somewhere, but replicating that will be
somewhere between hard and impossible.

Thanks for helping debug this.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-28 Thread Gunnar Hjalmarsson

On 2023-08-28 13:42, Tollef Fog Heen wrote:

]] Gunnar Hjalmarsson


What's the output of this command:

gsettings get org.gnome.desktop.input-sources xkb-options


$ gsettings get org.gnome.desktop.input-sources xkb-options
['compose:caps', 'compose:caps', 'grp:alts_toggle', 'lv3:ralt_switch']


Then run this command:

gsettings set org.gnome.desktop.input-sources xkb-options "['compose:caps']"



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-28 Thread Tollef Fog Heen
]] Gunnar Hjalmarsson 

> What's the output of this command:
> 
> gsettings get org.gnome.desktop.input-sources xkb-options

$ gsettings get org.gnome.desktop.input-sources xkb-options
['compose:caps', 'compose:caps', 'grp:alts_toggle', 'lv3:ralt_switch']

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-28 Thread Gunnar Hjalmarsson

What's the output of this command:

gsettings get org.gnome.desktop.input-sources xkb-options



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-28 Thread Tollef Fog Heen
]] Gunnar Hjalmarsson 

> But you must have set that group(alts_toggle) option somewhere, and on
> a Debian system the /etc/default/keyboard file is a suspect.

$ cat /etc/default/keyboard
# Check /usr/share/doc/keyboard-configuration/README.Debian for
# documentation on what to do after having modified this file.

# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.

XKBMODEL="pc105"
XKBLAYOUT="no"
XKBVARIANT=""
XKBOPTIONS="compose:caps"

# If you don't want to use the XKB layout on the console, you can
# specify an alternative keymap.  Make sure it will be accessible
# before /usr is mounted.
# KMAP=/etc/console-setup/defkeymap.kmap.gz
BACKSPACE="guess"

> Otherwise it may depend on which desktop environment you use. You
> never told us that, did you?

gnome-flashback on X11 (with xmonad, but I doubt that makes a
difference).

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-28 Thread Gunnar Hjalmarsson

Hi again,

On 2023-08-28 06:28, Tollef Fog Heen wrote:

]] Gunnar Hjalmarsson

I can't help asking why you set the "group(alts_toggle)" option at
all. You don't seem to use any other keyboard layout but Norwegian
anyway. So even before you have answered, my advice would be to just
drop that option wherever you set it and move on. ;)


I'm not setting it intentionally, but I suspect somewhere in the xkb
stack.  If I choose just Norwegian as my layout in gnome control center,
I get:

$ setxkbmap -print
xkb_keymap {
 xkb_keycodes  { include "evdev+aliases(qwerty)" };
 xkb_types { include "complete"  };
 xkb_compat{ include "complete"  };
 xkb_symbols   { include 
"pc+no+us:2+inet(evdev)+level3(ralt_switch)+compose(caps)+group(alts_toggle):1+group(alts_toggle):2"
   };
 xkb_geometry  { include "pc(pc105)" };
};

Which looks pretty bizarre to me, and I have no idea what «us» does
there.


Don't worry about 'us' — it's always there as some sort of default.

But you must have set that group(alts_toggle) option somewhere, and on a 
Debian system the /etc/default/keyboard file is a suspect.


Otherwise it may depend on which desktop environment you use. You never 
told us that, did you?


--
Gunnar



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-28 Thread Tollef Fog Heen
]] Gunnar Hjalmarsson 

> I can't help asking why you set the "group(alts_toggle)" option at
> all. You don't seem to use any other keyboard layout but Norwegian
> anyway. So even before you have answered, my advice would be to just
> drop that option wherever you set it and move on. ;)

I'm not setting it intentionally, but I suspect somewhere in the xkb
stack.  If I choose just Norwegian as my layout in gnome control center,
I get:

$ setxkbmap -print
xkb_keymap {
xkb_keycodes  { include "evdev+aliases(qwerty)" };
xkb_types { include "complete"  };
xkb_compat{ include "complete"  };
xkb_symbols   { include 
"pc+no+us:2+inet(evdev)+level3(ralt_switch)+compose(caps)+group(alts_toggle):1+group(alts_toggle):2"
   };
xkb_geometry  { include "pc(pc105)" };
};

Which looks pretty bizarre to me, and I have no idea what «us» does
there.

> In any case the issue is not severity "serious", especially not in a
> Debian distro context.

I'd argue that making people unable to write «@» is a release critical
bug in the package.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-08-27 Thread Gunnar Hjalmarsson

Control: severity -1 normal
Control: tags -1 + moreinfo

Thanks for your report!

Tollef Fog Heen wrote:

With commit 0fb34101788d84e9a1d98b3730cc7b9295e0f19b in
xkeyboard-config, `group(alts_toggle)` changed behaviour in a way
such that the right alt no longer generates altgr.


Apparently the purpose of the change was to make the "Both Alts" 
shortcut work again, after a long period when it didn't work.


https://salsa.debian.org/xorg-team/data/xkeyboard-config/-/commit/0fb34101

And in a working state, I'm not surprised to hear that "Both Alts" 
conflicts with the use of Right Alt for accessing 3rd and 4th level symbols.


I can't help asking why you set the "group(alts_toggle)" option at all. 
You don't seem to use any other keyboard layout but Norwegian anyway. So 
even before you have answered, my advice would be to just drop that 
option wherever you set it and move on. ;)


In any case the issue is not severity "serious", especially not in a 
Debian distro context.


--
Regards,
Gunnar Hjalmarsson



Bug#1040802: xkb-data: Breaks altgr in Norwegian layout

2023-07-10 Thread Tollef Fog Heen
Package: xkb-data
Version: 2.38-2
Severity: serious
Justification: makes a subset of systems effectively unusable
X-Debbugs-Cc: none, Tollef Fog Heen 

With commit 0fb34101788d84e9a1d98b3730cc7b9295e0f19b in
xkeyboard-config, `group(alts_toggle)` changed behaviour in a way such
that the right alt no longer generates altgr.  This is very problematic
with keyboard layouts such as Norwegian where that is required to type @
(altgr-2) or $ (altgr-4).

setxkmap no -print on my system outputs:

xkb_keymap {
xkb_keycodes  { include "evdev+aliases(qwerty)" };
xkb_types { include "complete"  };
xkb_compat{ include "complete"  };
xkb_symbols   { include 
"pc+no+inet(evdev)+level3(ralt_switch)+compose(caps)+group(alts_toggle)"
};
xkb_geometry  { include "pc(pc105)" };
};

which includes the problematic toggle.  I don't know if the right fix is
to revert the relevant commit (reintroducing the problem in
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/316)
or something else, but the current way it works is not great.

Happy to help debug this further, let me know what I can provide.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are