Skip to content

Modifiers can erroneously end up perma-set #583

@Jules-Bertholet

Description

@Jules-Bertholet

Consider the following symbols file (reduced from a real-world example):

default partial alphanumeric_keys
xkb_symbols "base" {
        name[Group1] = "Test latching behavior";

        key <AB01> { [ z, Z, y, Y, ezh, EZH, ydiaeresis, Ydiaeresis ], type[Group1] = "EIGHT_LEVEL" };

        key <LCTL> { [ Control_L ] };

        key <RALT> {
                symbols[Group1] = [ ISO_Level3_Latch, ISO_Level5_Latch ],
                actions[Group1] = [ LatchMods(modifiers=LevelThree,latchToLock=false,clearLocks), LatchMods(modifiers=LevelFive,latchToLock=false,clearLocks) ],
                type[Group1] = "PC_CONTROL_LEVEL2"
        };
};

When used along with the standard xkeyboard-config data, under current xkbcommon, with the following sequence of keypresses:

  • Press <LCTL>
  • Press and release <RALT>
  • Release <LCTL>
  • Press and release <RALT>
  • Press and release <AB01> (this should unlatch LevelThree)

LevelThree (Mod5) ends up permanently set, with no way to clear it, making the keyboard unusable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorstateIndicates a need for improvements or additions to the xkb_state API

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions