1

I like using Compose key. The problem is that large part of my text being typed in non-english layout. This means that some symbols messed up, and most isn't even present (i.e. latin characters). Adding a custom combinations to the «.XCompose» isn't even a way — too many combinations should be rewritten (I am using a custom file with many comfort additions).

It would be great if just after I pressed the Compose a keyboard layout was switched to English, and after a Compose combination done, switched back. So, that I could use English compose combinations in non-English layout. Is there a way to implement it?

2

You did not mention what "non-english" layout you want to use. Lets say its a Czech keyboard layout.

This command:

setxkbmap cz,us -option grp:win_switch

sets keyboard to Czech layout and when you press (and hold) Windows key, you have an American layout. Other keys might be used, my favourite is "caps_switch" for caps lock as composed key.

All possible keys are listed in: /usr/share/X11/xkb/rules/xorg.lst

  • ⁺¹ for idea, but not quiet what I wanted. This way isn't much more comfortable than just a manual switching to English layout every time I want to type a Compose combination. – Hi-Angel Jan 19 '15 at 4:10
  • @Hi-Angel I don't think so. Changing layout is like: 1) press a key for switching to English, 2) press a key you want to write, 3) press a key for switching off English. This is like: press <Win>+<key you want to write in English layout>. If I understand it correctly, you want something like: 1) press a key for switching to English, 2) press a key you want to write (and switch automatically back to previous layout) ? – Martin Jiřička Jan 20 '15 at 8:02
  • No, I want to not care about a layout at all. That is, I want just press «Compose», and type a combination like if I always in english layout, with disregard of my real layout at the moment. With your advice I'd needed to trace in which layout am I now, and decide should I press it, or no. Besides this when I am hold key, it makes my hand not so free, and for me it seems that a manual switching of a layout would be even easier. – Hi-Angel Jan 20 '15 at 9:03
  • @Hi-Angel To be honest, I still doesn't get that Compose key custom config file, despite I have checked the link. But one more idea: Maybe it is possible to switch all non-English layouts with the setxkmap command, so the Win key would work in whatever layout you use? But still there would be the need to press two keys together, that might be not so comfortable. – Martin Jiřička Jan 20 '15 at 9:40
  • 1
    @Hi-Angel OK, I have no idea on which level this very specific keyboard handling should be solved best. This is beyond what I know about X. But good luck with an extension! – Martin Jiřička Jan 20 '15 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.