Author Topic: Key remmaping software for Linux  (Read 2435 times)

0 Members and 1 Guest are viewing this topic.

Offline madik

  • Thread Starter
  • Posts: 48
  • Location: Czech Rep.
Key remmaping software for Linux
« on: Sun, 07 September 2014, 11:59:58 »
I having troubles with keyboard layout on notebook that is running Linux Mint Debian edition. I am used to QWERTZ but there is no English keyboard layout with qwertz in keyboard layout settings. On windows platform I using KeyTweak software which works perfectly and I just simply swap Y with Z and its done. On linux I have no idea how and with what I could do the same thing. Any ideas? thanks!

Offline dorkvader

  • Posts: 6289
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Key remmaping software for Linux
« Reply #1 on: Sun, 07 September 2014, 13:41:32 »
setxkbmap de

by "qwertz " I must assume you mean "german" even though a lot of different countries have a layout that includes that.

edit: if you are in czech republic, you might want to use the czech key layout. I forget the country code, probably cz or something. Read the setxbkmap manpage to see what it should be.
« Last Edit: Sun, 07 September 2014, 13:43:56 by dorkvader »

Offline Hypersphere

  • Posts: 1886
  • Location: USA
Re: Key remmaping software for Linux
« Reply #2 on: Sun, 07 September 2014, 13:52:12 »
If you ever use a Mac, there is a great free program called Karabiner. I use this indirectly with my linux box, because I use a single keyboard with three computers (Mac, Linux, and Windows) that are linked via an Iogear KW switch and Synergy software.

However, when using my keyboard directly with linux, I either make use of the desktop manager keyboard configurator, or I use XKB or xmodmap, which has an associated gui, xkeycaps. However, I have not tested these for your particular remapping.

Offline madik

  • Thread Starter
  • Posts: 48
  • Location: Czech Rep.
Re: Key remmaping software for Linux
« Reply #3 on: Sun, 07 September 2014, 13:56:32 »
setxkbmap de

by "qwertz " I must assume you mean "german" even though a lot of different countries have a layout that includes that.

edit: if you are in czech republic, you might want to use the czech key layout. I forget the country code, probably cz or something. Read the setxbkmap manpage to see what it should be.
Yeah you assuming correctly. But i use mainly english layout because I code and the US layout its just better for that. For czech input I using czech qwertz layout, thats not a problem. 
I will check out the setxkbmap and see if it will do the job i need. thanks

Offline madik

  • Thread Starter
  • Posts: 48
  • Location: Czech Rep.
Re: Key remmaping software for Linux
« Reply #4 on: Sun, 07 September 2014, 14:01:09 »
If you ever use a Mac, there is a great free program called Karabiner. I use this indirectly with my linux box, because I use a single keyboard with three computers (Mac, Linux, and Windows) that are linked via an Iogear KW switch and Synergy software.

However, when using my keyboard directly with linux, I either make use of the desktop manager keyboard configurator, or I use XKB or xmodmap, which has an associated gui, xkeycaps. However, I have not tested these for your particular remapping.

Lots of new informations for me. Gonna check out if it will be any good for me. But not a mac user here (apple hater actually  :thumb:).

Offline madik

  • Thread Starter
  • Posts: 48
  • Location: Czech Rep.
Re: Key remmaping software for Linux
« Reply #5 on: Sun, 07 September 2014, 19:31:44 »
I made some progress with solving my problem. These two commands will do the job for keyswapping. But after restart its back to previous configuration. Do you know how to make the changes persistent after restart?

xmodmap -e "keycode 29 = z Z z Z"
xmodmap -e "keycode 52 = y Y y Y"

Offline Hypersphere

  • Posts: 1886
  • Location: USA
Re: Key remmaping software for Linux
« Reply #6 on: Sun, 07 September 2014, 19:35:52 »
I made some progress with solving my problem. These two commands will do the job for keyswapping. But after restart its back to previous configuration. Do you know how to make the changes persistent after restart?

xmodmap -e "keycode 29 = z Z z Z"
xmodmap -e "keycode 52 = y Y y Y"
You probably need to put this information in a persistent configuration file, such as .profile in your home directory.

Offline madik

  • Thread Starter
  • Posts: 48
  • Location: Czech Rep.
Re: Key remmaping software for Linux
« Reply #7 on: Sun, 07 September 2014, 19:51:12 »
Ok with some more googling effort I made the changes persistent. The tips on XKB and xmodmap helped me to find the solution pretty fast. Thanks!

Offline fleimi

  • Posts: 7
Re: Key remmaping software for Linux
« Reply #8 on: Mon, 08 September 2014, 14:29:33 »


I made some progress with solving my problem. These two commands will do the job for keyswapping. But after restart its back to previous configuration. Do you know how to make the changes persistent after restart?

xmodmap -e "keycode 29 = z Z z Z"
xmodmap -e "keycode 52 = y Y y Y"

A simple program called Cron will do that for you. Read the manpage of it. Essentially, you make yourself a "crontab" and add these lines to it:

@reboot xmodmap -e "keycode 29 = z Z z Z"
@reboot xmodmap -e "keycode 52 = y Y y Y"

Offline StylinGreymon

  • Keyboard Hipstar
  • Posts: 637
  • Location: Portland, OR
Re: Key remmaping software for Linux
« Reply #9 on: Mon, 08 September 2014, 14:53:49 »
I made some progress with solving my problem. These two commands will do the job for keyswapping. But after restart its back to previous configuration. Do you know how to make the changes persistent after restart?

xmodmap -e "keycode 29 = z Z z Z"
xmodmap -e "keycode 52 = y Y y Y"
You probably need to put this information in a persistent configuration file, such as .profile in your home directory.

You need to make an .Xmodmap file in your ~ directory.
Code: [Select]
$ xmodmap -pke > ~/.XmodmapThen, you can make your changes to the file and save them.
You call it with:
Code: [Select]
$ xmodmap ~/.Xmodmap
To have it called on startup, just add that last command to your .xinitrc
If today had been a hippo, then you'd really have to worry about tomorrow.

Offline vimx

  • Posts: 90
  • ENHANCE
Re: Key remmaping software for Linux
« Reply #10 on: Fri, 12 September 2014, 20:41:58 »
I put my mouse and keyboard tweaks in a single shell  script which runs from two places.   Once at login, as a startup item, and once from the system power management script,  so things are good after it comes out of sleep.