Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Auto-Type shortcut not working if started in .xinitrc with non-default layout #8237

Open
adrian-amaglio opened this issue Jul 4, 2022 · 2 comments

Comments

@adrian-amaglio
Copy link

adrian-amaglio commented Jul 4, 2022

First a big thanks for your amazing piece of software <3

Overview

I am using a gnu/linux OS.
I want keepassxc to start with my graphic environment so I start it in my .xinitrc file.
But at the .xinitrc time, keyboard layout is not yet set, so the key grabbed by keepassxc for the Auto-Type shortcut is the default layout.

Steps to Reproduce

  1. Have a keyboard configuration different than the default one (my hardware keyboard is qwerty).
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "fr,fr"
Option "XkbVariant" "bepo,"
Option "XkbOptions" "grp:lctrl_lwin_toggle"
EndSection
  1. Run keepassxc in your .xinitrc file (do not run setxkbmap in .xinitrc to reproduce, it would fix the issue)
  2. Set the auto-type shortcut to Ctrl+Shift+F (F got a different place in fr-bepo and qwerty) keepass reads the actual layout.
  3. Press the auto-type shortcut with the hardware layout (with qwerty F key)
  4. Auto-type window is opening
  5. Press the auto-type shortcut with the actual layout (fr-bepo F key)
  6. Auto-type window is not opening

Expected Behavior

I expect the Auto-type window to appear when I press the exact same keys I pressed registering the shortcut.

Actual Behavior

The key shortcut grabbed by keepassxc is not the key shortcut I typed in.

Context

sxhkd had the same issue. It was solved by using the -m 1 option.
https://manpages.org/sxhkd

Debug infos

KeePassXC - Version 2.7.1
Revision: 5916a8f

Qt 5.15.5
Debugging mode is disabled.

Operating system: Manjaro Linux
CPU architecture: x86_64
Kernel: linux 5.10.126-1-MANJARO

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare
  • YubiKey
  • Secret Service Integration

Cryptographic libraries:

  • Botan 2.19.2

Environment

Operating System: Manjaro (Arch) Linux
Desktop Env: dwm
Windowing System: X11

@droidmonkey
Copy link
Member

You need to delay the start of keepassxc until all that is available. We offer an auto start option in application settings that has delays in it for gnome and kde. If you roll your own you'll have to figure out sleeps and such to get it to wait. Nothing we can really do about this on our end.

@droidmonkey droidmonkey closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2022
@adrian-amaglio
Copy link
Author

Thanks for your quick reply!
sxhkd seems to update its mapping on XCB_MAPPING_NOTIFY event. It seems to be a deterministic and reliable way to handle this issue rather than delaying ?
https://github.com/baskerville/sxhkd/blob/fe241b0d2d70c9c483b23cf3cd14f1383f0953a2/src/sxhkd.c#L268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants