LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Keyboard editor (https://www.linuxquestions.org/questions/linux-software-2/keyboard-editor-4175514707/)

nyuwa43 08-13-2014 12:50 PM

Keyboard editor
 
Good evening
Very long ago I used WordPerfect. That had a keyboard editor built in, allowing to assign individual keys differently.
Later I had to use a (not very elegant but still working) MS application to achieve that.
Achieve: I use English + German keyboard layouts.
But since I am used to the English KB layout, I would like to reassign the "z" and "y" keys, which are on these two KB layouts reversed.

Is there somewhere a little application out there, that lets me do that?
I have been looking but cannot find anything.

Thank you in advance.

smallpond 08-13-2014 02:48 PM

You should be able to use the command setxkbmap to set a standard layout, or xmodmap to do low-level tinkering.

nyuwa43 08-13-2014 08:44 PM

Thank you!
I will have to study about that.
Being anything but a computer expert the terms "setxkbmap", "xmodmap" mean precisely nothing to me,
so that I have absolutely no idea what to do and how to do it ...

DavidMcCann 08-14-2014 01:04 PM

The German keyboard layout is /usr/share/X11/xkb/symbols/de and it contains the lines
key <AD06> { [ z, Z, leftarrow, yen ]};
key <AB01> { [ y, Y, guillemotright, U203A ] };
If you swap over the "y" and the "z", that will give you qwerty instead of quertz the next time you log in. You have to repeat the trick when you re-install a new version of Linux, but it's a lot less trouble than learning and using xmodmap.

PS You need to run a terminal and become root with "su", then launch your editor; or else use "sudo name_of_editor" — it depends on your distro. That's why it's a good idea to put your distro name in your profile.

nyuwa43 08-17-2014 10:17 AM

Thank you, but
 
Thank you!
That sounds like a really "workable" option.
However, even though I am the one and only user, set my account to "administrator",
running a terminal -> enter "su" + PW ...
I get the error "Authentication failure".
There is only one password that I set, there is only one account.
How can "authentication" fail?

And attempts at changing the permissions for the "de" file in order to make changes also failed.
Probably I made mistakes, but do not know where.

PS: Thank you for your hint about my profile.
Actually, I set up this account but used it only once several years ago.
My struggles to get friendly with Linux remain(ed) mostly futile, so I did not bother about setting up a fancy profile.
But today I added a few lines ...

DavidMcCann 08-17-2014 11:47 AM

That's because you're using Mint and Lubuntu, which don't use an administrative password. You need to type
sudo gedit /usr/share/X11/xkb/symbols/de
and then it will prompt for a password and you type the one that you used to log in.

nyuwa43 08-24-2014 10:37 AM

I am really sorry to bother you, but ...
I still cannot make it work.

Thanks to you, I WAS able to edit the file. VERY good so far.
The original file, as you pointed out, looked like:
The German keyboard layout is /usr/share/X11/xkb/symbols/de and it contains the lines
key <AD06> { [ z, Z, leftarrow, yen ]};
key <AB01> { [ y, Y, guillemotright, U203A ] };

After my editing (copied from that file) it looks now like:
key <AD06> { [ y, Y, leftarrow, yen ] };
key <AB01> { [ z, Z, guillemotright, U203A ] };

(rebooted / restarted)

Yet, I still get the original configuration, where in the German KB layout z + y are reversed.
Did I make another mistake?
Or do I have to change THE OTHER instances (plural) of "z + y" occuring in the file?
(some look very scary to me)

Somewhere in the middle of the file it also says:
partial alphanumeric_keys
xkb_symbols "qwerty" {

// This layout should work exactly as a de with the exception
// of 'Z' and 'Y' keys, which are in the qwerty style (ie. swapped).
// 2008 by Matej Košík <kosik@fiit.stuba.sk>

include "de(basic)"

Does this mean, the original keyboard layout was SUPPOSED to work like a qerty KB? (it did not, though)

I appreciate your help.

DavidMcCann 08-24-2014 11:52 AM

Looking at the file, I see that there are lots of variants — 15 on my computer. My fix was for the first on the list, and you must have one of the others installed. But it turns out that you don't need to edit anything. The item you found is a driver for a German QWERTY keyboard, which I didn't know existed. Run the keyboard configuration tool. Delete the German driver you have. Then add a German keyboard, selecting QWERTY from the variants offered. That will sort it out.


All times are GMT -5. The time now is 12:34 PM.