I currently have the Greek (Polytonic) keyboard layout installed, and it works wonderfully for typing Ancient Greek.

However, I sometimes find myself needing to type the obscure letter digamma (capital Ϝ, lowercase ϝ), which isn't available on this keyboard. Ideally I'd move the final sigma to the Q key, and put digamma on the W.

Is there an easy way to accomplish this? I found this page, but it warns me that it's not updated for current versions of Ubuntu. Moreover, digamma is too obscure to be given a name in /usr/include/X11/keysymdef.h (though it does have suitable codepoints in Unicode), and I'm not sure what I'd have to recompile if I edited that file.

  • If it's only one or two symbols you want to change, I'd suggest that you simply try to edit the /usr/share/X11/xkb/symbols/gr file directly. – Gunnar Hjalmarsson Aug 15 at 21:22
  • @GunnarHjalmarsson I tried that, but unfortunately this character isn't defined in keysymdef.h (so it has no name I can use, and I have no idea how to use a codepoint in place of a defined name). – Draconis Aug 15 at 21:46
  • XKB understands the notation U03DC and U03DD. No need to mess with keysymdef.h. – Gunnar Hjalmarsson Aug 15 at 22:05
  • Oh, if that works, that's exactly what I need. Feel free to post it as an answer! – Draconis Aug 15 at 22:27
  • I suggest that you try it, and if it proves to work for you, please feel free to submit an answer with the solution. It's perfectly fine to answer your own question. :) – Gunnar Hjalmarsson Aug 15 at 22:32

As Gunnar Hjalmarsson pointed out in the comments, xkb understands Unicode codepoints as well as named characters.

I replaced the final sigma key with this:

key <AD02> { [                 U03DD,          U03DC ] }; // ϝ Ϝ

And after a reboot, everything works as expected!

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.