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

How to implement custom dead keys on XKB? #17

Open
devnoname120 opened this issue Nov 28, 2021 · 3 comments
Open

How to implement custom dead keys on XKB? #17

devnoname120 opened this issue Nov 28, 2021 · 3 comments

Comments

@devnoname120
Copy link
Member

devnoname120 commented Nov 28, 2021

Some ideas:

  • Use a .XCompose file.
    • Problem: not layout specific, instead it's shared across all keyboard layouts (minimum granularity: locale-level).
  • Emulate dead keys using latches.
    • Problem: not compatible with some apps, few available (level 5 + maybe level 3, not sure how other levels behave in some apps). See example of implementation on the qwerty-lafayette layout.

👍 .XCompose supports multi-codepoint characters: https://unix.stackexchange.com/a/549228

@devnoname120
Copy link
Member Author

devnoname120 commented Jun 1, 2022

I think .XCompose is the best way forward. The whole point of qwerty-fr is to give the chance never to switch your keyboard layout ever again thanks to its comprehensive languages support.

For this reason it makes sense to replace the default .XCompose.

See this for an example:

@Schnouki
Copy link

Should we use ~/.XCompose (and require user intervention), or try to patch the system-wide compose file, e.g. /usr/share/X11/locale/en_US.UTF-8/Compose?

The former is of course easier to develop, but the latter could be nicer for users, as they wouldn't have to change a dotfile in their $HOME. Just install the package and it works 🎉. It also makes sense since the Debian postinst/postrm scripts (also used by the Archlinux AUR package) already patches a few files in /usr/share/X11.

@devnoname120
Copy link
Member Author

devnoname120 commented Mar 13, 2023

Installing the keyboard globally and then requiring each user to apply the changes to ~/.XCompose would make for an awkward user experience in my opinion.

What would you think about using dpkg diversions (tutorial here) instead of directly patching the system file?

How are other keyboard layouts solving this issue? Are they all just replacing the system-level Compose files?

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