Skip to content

Multiple layouts' existence breaks character typing for conflicting keys #296

@Benna96

Description

@Benna96

Hello! I use mainly UK layout, but occasionally switch to Finnish layout.
The presence of 2 layouts on my system seems to be causing a problem with the typing of keymapper...
(Could be more issues too, I'm only just trying this out.)

Details

Version: 5.0.0
System: Linux Mint 22.1 Cinnamon
keymapper.conf:

Control{BracketLeft} >> "¯\_(ツ)_/¯"

alternate keymapper.conf, inspired by Ristomatti's reply in another issue, same issue:

type = $(keymapperctl --type "$0") ^

Control{BracketLeft} >> type["¯\_(ツ)_/¯"]

Output when UK layout is active: ¯\_*ツ(_&¯
Output when Finnish layout is active: ¯\?(ツ)?/¯

The issue occurs regardless of which layout is active upon starting keymapper.
The issue does not occur if I remove the other layout so I only have UK or only Finnish left.

About the characters

  • UK layout's * and & are input the same way Finnish layout's ( and / are... Shift{Digit8} and Shift{Digit7}, respectively
  • Finnish layout's ? is input the same way UK layout's _ is... Shift{Minus}
  • The characters without issues are either unicode-only or able to be input the same way in both UK & Finnish layout

Thoughts on cause

It kind of seems like, rather than fetching my current layout on config load as implied in the readme, it's... making some kinda weird combo of the possible layouts? Which ends up working with neither.

Workaround

I managed to workaround it by copying to & pasting from clipboard, instead of typing, though this did require me to install xclip:

type = copy["$0"] paste
copy = $(echo "$0" | xclip -selection clipboard) ^
paste = Shift{Insert}

Control{BracketLeft} >> type["¯\_(ツ)_/¯"]

Perhaps a flag to either use the clipboard, or to use hex code input, could be added to keymapperctl --type, as a built-in workaround?
Ideally, of course, I'd like this to just be fixed, as the issue seems like it's related to layout detection.

If current layout detection from the possibilities is hard, maybe a command line switch on keymapper to specify a layout?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions