input-remapper icon indicating copy to clipboard operation
input-remapper copied to clipboard

Combinations involving Modifiers on Wayland. Modifier key not released.

Open petrstepanov opened this issue 2 years ago • 6 comments

Dear @sezanzeb, thank you for this great remapping tool. I love the UI and scripting approach. I believe I found an issue with cancelling the modifier key for combination of keys.

The "Combinations" section of the documentation says that the modifier key in combination can be released by writing the modifier one more time. Here is the picture I am referring to:

Scenario: user presses Shift_L + p. Expected result: lowercase a is written.

I did test this scenario on Xorg and Wayland and it only seems to work on Xorg. On Wayland the uppercase A is written instead. Please refer to the screenshot below:

Here is my environment:

> uname -a
Linux fedora 5.15.6-200.fc35.x86_64 #1 SMP Wed Dec 1 13:41:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

> key-mapper-control --version
key-mapper 1.2.1 b23e6d5340bb3c0e6337196d13af5c69d6b6540d https://github.com/sezanzeb/key-mapper
python-evdev 1.4.0

> echo $XDG_SESSION_TYPE
wayland

I skimmed through the "Issues" and "Discussions" pages and did not find the issue documented. I also tried installing key-mapper from main and key-mapper-devices branches.

Thanks again for your time and efforts. Looking forward to hearing from you!

petrstepanov avatar Dec 10 '21 03:12 petrstepanov

Hi,

to verify if the installation from key-mapper-devices worked correctly, you can print the commit hash that is currently being used with this:

key-mapper-control --version
key-mapper 1.2.1 cb39d39eeb74a89b0337bf8e01e857cddfed91db https://github.com/sezanzeb/key-mapper

cb39d39eeb74a89b0337bf8e01e857cddfed91db is the latest commit on that branch

sezanzeb avatar Dec 10 '21 08:12 sezanzeb

Thank you. My bad. I must have missed something. Just re-tested and ensured the behavior is correct. Any estimate when this will be merged to the main branch?

petrstepanov avatar Dec 13 '21 13:12 petrstepanov

There is some work being done here: https://github.com/sezanzeb/key-mapper/pull/228

@JonasBoss we might want to first get the global uinputs to work and then work on arbitrary configurable uinputs in a separate PR to get this released faster, what do you think?

sezanzeb avatar Dec 13 '21 13:12 sezanzeb

Yes, that is pretty much my current idea. First get all the current features working with a few predefined global uinputs. Then expand the features by adding support for user-defined UInputs and hopefully support for more arbitrary event mapping.

jonasBoss avatar Dec 13 '21 15:12 jonasBoss

it might be possible to simplify the use of k(Shift_L) in the example above with a new macro called release_all(). It would release all keys currently pressed on that device. This makes especially a lot of sense when the k workaround would require multiple modifiers to be released before going on with the intended mapping.

sezanzeb avatar Dec 22 '21 16:12 sezanzeb

related to:

  • https://github.com/sezanzeb/key-mapper/issues/176
  • https://github.com/sezanzeb/key-mapper/issues/221

sezanzeb avatar Dec 22 '21 16:12 sezanzeb

This can be done on beta nowadays. See https://github.com/sezanzeb/input-remapper/blob/beta/readme/usage.md#combinations

sezanzeb avatar Nov 12 '22 19:11 sezanzeb