0

We are using a custom written (by me) xkb Symbols file for a minority language. This has worked fine for over ten years and we roughly know how the system works. I am presently re-working the keyboard as the language is evolving.

Now I noticed we have a few positions left on our layout (Marked NoSymbol) and would like to assign very frequently needed "strings" of several characters. I would like to do this at the level of xkb so that we have consistent behaviour in our entire office, and can help other users, whatever the Linux distributions and versions, and different hardware keyboards.

I have searched through many posts here and outside StackExchange and it seems nobody ever covered this need or I am using bad key words. I have also once custom-written an Android keyboard for the same minority language and could easily assign text-strings to the "leftover keys".

I have tried guessing the syntax for our Symbols file, with "quotes" and without quotes and got no joy. I also tried whether I could assign this in our keysymdef.h but noticed that it is absent from the old, known location at /usr/include/x11/keysymdef.h and cannot find any new location in OpenSuse Leap 15.2.

This is an example line, where I would like to add the string "it works" in the third position (to facilitate communication):

key <KPDL>  { [   comma,  period, NoSymbol, NoSymbol  ] };                                     

Thank you for any hints.

Martin Zaske
  • 101
  • 2
  • 2
    Does this answer your question? [Custom xkb layout in which one key creates two unicode code points](https://unix.stackexchange.com/questions/43073/custom-xkb-layout-in-which-one-key-creates-two-unicode-code-points) – Gilles 'SO- stop being evil' Jun 02 '21 at 16:52
  • @Gilles'SO-stopbeingevil' Yes, thank you, this is the first web page that even treats my issue. I had hoped to find a solution fully within the xkb system. But still I will try the hack via the Xmodmap to see how much effort it would be to equip our entire office that way. And whether it would break the xkb system, if any user would not have a matching Xmodmap in his home folder. – Martin Zaske Jun 02 '21 at 17:16
  • I don't think there's a pure XKB solution. It's designed to associate a character to a key, not a string. I was even surprised xmodmap could do it. – Gilles 'SO- stop being evil' Jun 02 '21 at 18:37
  • You might be able to use `xbindkeys` (binding) together with `xdotools` (text injection). Or go to the next level and create an IM for that language. It would also be global. – Eduardo Trápani Jun 03 '21 at 00:29

0 Answers0