Wrong keybord layout

Hello all ,

I’m new to this forums , so I’ll introduce myself a bit. I’m Evert , 17 years old and I’m living in belgium. I’m learning blender since few weeks , so i’m not further then the ‘basic man model’ from the noob to pro wiki’s ;).

That I’m living in belgium has got one problem , i’m used to the azerty keybord lay-out. That was no problem with blender under windows , it used (like i wanted) azerty.

But since a few weeks I installed gentoo linux , and now i’ve got deleted my windows. I tought i could do blender stuff also under linux :). Yeah blender works , only one thing isn’t working … the keybord lay-out. Under kde I’m using azerty , just like in the console… But blender uses the qwerty lay-out.

That’s a big problem for me , because i’m used to the schortkeys like ‘a’ and ‘z’ and they are now swapped with ‘q’ and ‘w’ … Verry annoying.

I’ve searched on the internet , but i didn’t found the same problem I’m having , i found lot’s of troubles with azerty with some specific keys , but not with ALL the keys ;).

So i’m really needing your help ,

Already thanks , evert :).

Congrats on choosing Gentoo, I’m a user too and think it’s awesome :D.

What you have to do is get rid of the azerty layout in kde (switch it back to qwerty) and have to define your own layout using xmodmap.

For example you can start by switching ‘A’ and ‘Q’. Execute

xmodmap -pke

Find out which keycodes map to which letter

keycode  38 = a A a A asciitilde AE
keycode  24 = q Q q Q backslash Greek_OMEGA

Create a file ~/.Xmodmap and change their assignment

keycode  24 = a A a A asciitilde AE
keycode  38 = q Q q Q backslash Greek_OMEGA

Like this fill the .Xmodmap file with all the desired changes, then execute

xmodmap ~/.Xmodmap

and if it works, add the execution to your startup script (probably .xinitrc).

That should work :slight_smile:

Cool , very nice :slight_smile: :).

It worked good , is there a possibility to start two scripts when i start blender ? One to switch to the qwerty lay-out (us map) and one to start the xmodmap script then ?

So i can keep my azerty for normal usage , and swap to qwerty (with only some keys swapped to azerty) for when i use blender ?

Xmodmap works at the xorg level, so every program you run is affected. That means you can’t make it application specific.

The only partial solution is to write a script that will switch the keyboard to qwerty on start of Blender and switch back to azerty when you quit. However, while running Blender, you will have qwerty in all applications.

To write such a script is not hard. You have to create two files for modmap.
One of them is easy, you just dump the output of

xmodmap -pke > qwerty.modmap

Copy it to azerty.modmap and switch the assignments you need.

Then the script will look like this:

xmodmap qwerty.modmap
xmodmap azerty.modmap

Call the script for example qwertyBlender.sh and execute

chmod u+x qwertyBlender.sh

to make the script executable.

I don’t know/use/have KDE, so I can’t tell how to change the KDE layout via script.