xkbcommon / libxkbcommon

keymap handling library for toolkits and window systems
https://xkbcommon.org
Other
283 stars 125 forks source link

Determining required dead keys #361

Open johngebbie opened 1 year ago

johngebbie commented 1 year ago

Hello, I'm not sure how to programatically determine the required dead keys for a keysym. For example, I don't know how you'd get that you need to type dead_circumflex and e to type ecircumflex in the fr layout.

how-to-type doesn't seem to implement it, with this outputting no entries:

xkbcli how-to-type --layout fr --keysym ecircumflex

I think ecircumflex could be found under a level with xkb_keymap_key_get_syms_by_level, but (if that's even right) I'm not sure how to map the levels to the required dead keys.

My end goal is to have my uinput tool support typing symbols that require dead keys.

wismill commented 1 year ago

Currently the tool how-to-type does not support Compose. It means it will not look for keysyms that are the result of e.g. a sequence consisting of a dead key and a letter, such as: <dead_circumflex> <e>.

Unfortunately it does not seem there is a public API to get a sequence from its result.

johngebbie commented 1 year ago

Thank you, it's good to know I'm not just not seeing it. Shall I make this a feature request?