2

I'm using Czech keyboard.

keycodes:   evdev+aliases(qwertz)
types:      complete
compat:     complete
symbols:    pc+cz+inet(evdev)
geometry:   pc(pc105)
rules:      evdev
model:      pc105
layout:     cz

In Windows I was used to use "programming" characters using AltGr+3 (^), AltGr+1 (~), and AltGr+7 (`).

Because I'm switching from time to time back to windows I need to make it behave the same. Instead of AltGr+6 (^), AltGr+Shift+; (~) and AltGr+; (`).

It's weird that other characters like []{}\€# work as expected using AltGr + FGBNQEX, but the three above are remapped elsewhere...

  • Are you using the same layout on both systems? I am guessing your Ubuntu is using a different variant of Czech than your Windows. What is the output of setxkbmap -query -v? Note the "variant" field and check the details of your layout in Windows. – terdon Jan 7 at 10:37
  • I use the Czech keyboard, too. The characters “remapped elsewhere” (than Microsoft decided) are available on the keys where they reside on the English keyboard – you might have these characters printed on your physical keyboard. The []{}\# characters are available in both locations on Ubuntu but ^`~ conflict and the location of the Engish keyboard seems to be preferred. Compare the Windows and Ubuntu layout. – Melebius Jan 7 at 10:38
  • Yes, I know you use the Czech keyboard on both, the question is what variant of the Czech keyboard you use. There are several variants of each layout, and this is what you probably need to change. Please show us the output of setxkbmap -query -v as requested because that will show the variant you use on Ubuntu. Changing to the same variant should solve the problem. – terdon Jan 7 at 10:51
  • @terdon Both Tomáš and I experienced that the default variant of the Czech keyboard differs between Windows and Ubuntu in the special characters. There is no Windows layout available as of Xubuntu 18.04. See grep cz /usr/share/X11/xkb/rules/xorg.lst. – Melebius Jan 7 at 11:03
  • 1
    @terdon: Well, a simple check of the cz symbols file shows that that chance is zero. Currently there is no exact Windows equivalent among the cz variants. – Gunnar Hjalmarsson Jan 7 at 12:21
2

You can open the /usr/share/X11/xkb/symbols/cz file for editing and make the desired changes directly. When doing so, you'll need to decide how important the original symbols typed via AltGr+{1,3,7} (!, #, &) are to you, and handle those accordingly.

Caveat pointed out by terdon:

This will be overwritten by any updates though, so it would make sense to make a copy of the file so the changes can be reapplied easily.

  • Hmm, nice! You might want to add that this will be overwritten by any updates though, so it would make sense to make a copy of the file so the changes can be reapplied easily. In fact, maybe also mention xbindkeys as an alternative approach? – terdon Jan 7 at 12:27
  • @terdon: Thanks for mentioning that updates will overwrite the changes. Added it to the answer. As regards xbindkeys, I'm not too familiar with how to use it, so it would be good if you could post an additional answer. – Gunnar Hjalmarsson Jan 7 at 12:36
  • This seems like the best option, I'll try this. – Tomáš Fejfar Jan 8 at 9:25

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.