2

From time to time when in Linux some program recognize a keyboard key (or a combination of keys) as "Next Group".

This annoyance usually shows up due to an error in the keyboard layout configuration and is not in the scope of this question.

What I want to ask is what this "Next Group" key (keycode?) is? Why is it named that, and why is it used for? No searches on the internet shows up any answers for me.

Last time I stumbled upon this was in XFCE when configuring hotkeys for the Windows Manager, where the key name "Next Group" showed up when pressing Left Alt+Left Shift.

2
  • How does this manifest? How do you know it is "next group"?
    – Mokubai
    Commented Mar 25, 2020 at 20:09
  • From my latest experience: When assigning a hotkey for XCFE window manager you get a dialog window that asks you to hold down a key combination. When I hold down Left Shift it displays "Left Shift" in the dialog box. The same for Left Alt, it displays "Left Alt". But when I hold down Left Shift and Left Alt at the same time the dialog box says that I'm pressing a button called "Next Group".
    – Svintoo
    Commented Mar 25, 2020 at 20:31

1 Answer 1

1

It's used for switching between keyboard layouts. Its keysym is ISO_Next_Group and there are similar (but I think much less used) "previous group", "first group", "last group" key codes as well.

You might recognize Shift+Alt from Windows, where it usually serves the same purpose – if you have more than one keyboard layout, of course. (It is very common e.g. in Europe to have a local layout and the US English layout, and using Shift+Alt to switch between them dates back at least to Windows 95.)

There are two uses for this key:

  1. I think it got its name because the intended use is directly within a single Xkb layout, where mappings are actually done as "(keysym, group) => character" rather than just "keysym => character". As I understand it (from a quick skim), these groups are usually used for 'Shift+' and 'AltGr+' levels, but as can be seen in this Arch Wiki article, it is also possible to define keys which perform locking i.e. persistent group movements (similar to "dead keys"), allowing a single Xkb layout definition to switch between multiple languages.

  2. But a more typical use is to use ISO_Next_Group as a traditional system-wide hotkey which is bound to the "Switch layouts" action in your WM/DE. Instead of being directly interpreted by Xkb, it is interpreted by XFCE's standard hotkey handler, which then instructs Xkb to activate the next layout.

  3. Come to think of it, I'm not entirely sure whether any other DEs besides GNOME 3 actually handle it on their own, because Xkb comes with a built-in option grp:alt_shift_toggle that apparently enables the same layout switching within X directly. (GNOME 3 has to hook ISO_Next_Group because it actually switches between built-in Xkb layouts and IBUS-Daemon layouts, which is not applicable for most other DEs.)

    (Or maybe grp:alt_shift_toggle is what maps Alt+Shift to ISO_Next_Group?... Either way, I'm sure that I'm really mixing some things up here.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .