Skip to content

Shortcuts lost/mismatched if bound to X11 in differing orders #6834

@Dessix

Description

@Dessix

Description

I am using the OpenDeck tool, which internally utilizes Enigo for input emulation.

I have several push-to-talk keys set up to emulate keys which are not normally bound in X11's xmodmap. However, Enigo has the capability to dynamically map these keys as long as the modmap has open slots. It does so for unmapped keys upon their first invocation.

I have bound global (Parent + subchannels), local (current only), and push-to-talk to F33, F34, and F35 respectively. However, Mumble stores these based on their index in the xmodmap, rather than their actual key symbol.

What's odd is that Mumble is frequently able to recognize what key symbol it is, but then loses it later; this seems to be because the key is stored as the xmodmap index and only displayed by its known symbol. If Mumble is then loaded without the key in question mapped, it forgets that it was - for example - F35, and simply shows whatever index that key was at the time of previous use. If that index is now occupied by a different key, it silently binds to that new key.

If it is possible to store the expected symbol, then load it when a new keycode is activated, rather than only storing the index into the xmodmap, this could avoid the binding juxtapositions.

Steps to reproduce

Here is what it looks like if I open Mumble after pressing the global (F33) then local (F34):
Image

Then if I close OpenDeck, dropping the Enigo context, these dynamic-bound keys are unmapped; opening Mumble anew shows the raw indecies previously held by these keys at binding time:
Image

But if I now start OpenDeck anew, then press the buttons in the opposing order, local (F34) then global (F33), then load Mumble, I end up with the following corrupted configuration:
Image

Mumble version

1.6.0 on master branch and on davidebeatrici:shortcut-data-qdatastream-fix

Mumble component

Client

OS

Linux

Reproducible?

Yes

Additional information

For reproducibility's sake, these OpenDeck bindings look like this:
Image

OpenDeck only preserves Enigo contexts long enough to use for PTT (helpful but not required to repro, otherwise unmapping is near-instantaneous) in this branch.

Relevant log output

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions