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

Better support for multiple keyboard layouts. #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomboehmer
Copy link

@tomboehmer tomboehmer commented Jul 6, 2022

Disclaimer: I am opening this pull request to get some early feedback on my changes. I am actually still on xbindkeys at the moment, so I have not even fully tested them (ctrl + u: echo hello word works, though). There are some todos I would like your input on.

How I want to handle multiple layouts

  • specify a base layout up front (command line / maybe config file)
  • resolve key codes with respect to this layout regardless of the one being active

How this is different from the status quo

  • as I understand it, sxhkd currently locks in on the layout that is active at startup (or responds to mapping events)
  • I never actually use the layout I want as my base (base: qwertz, active: dvorak,cyrillic,...)
  • current mapping can be broken by restarting sxhkd while the wrong initial layout is active

Status

  • Use XKB to select the keymap and handle keycode <-> keysym conversions
  • Treat ctrl + U as ctrl + shift + u (what exactly is the rule here, is there a point to it anyway?)
  • Figure out the point of the keysym -> keycodes -> keysyms conversion sequence (does this relate to the above point?)
  • Add the command line flags (--rule,--model,--layout,--variant,--options)

@TAforever
Copy link

Hello! I noticed that if I switch to the Russian layout to increase / decrease the volume or when resizing the window, holding the key does not work, that is, I need to press the key many times. Does your PR fix this behavior and if not, could you fix it as well?

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

Successfully merging this pull request may close these issues.

None yet

2 participants