Sunday, 29 September 2013

How remap CTRL-key to Alt right (tried everything)

How remap CTRL-key to Alt right (tried everything)

My specs: Xubuntu 13.04, which uses (what I believe) Xorf as X Window
Manager.
Intro: some weeks ago I switched to Linux (Xubuntu). I configured
everything to work only with my keyboard without ever using the mouse.
Works like a charm. But recent, I wanted to remap the [ctrl] to
[capslock]. ~/.xmodmap seems not working. I found the answer here:
**/usr/bin/setxkbmap -option "ctrl:nocaps"** does the trick. I putted the
command as autostart.
Works fine until I got RSI-like issues with my left pink the last days. My
pink tingles weird and causes much pain at the end of day (even I'm using
ergonomic keyboard!). I tried everything to avoid this, like the correct
posture and taking breaks, weight lifting. Nothing helps. Then I looked
closer to my keyboard flow. I noticed I use the spacebar most, on second
the [Capslock]-button that behaves like [ctrl]. But I have no pain in my
thumbs. I dont use the right [Alt], so it would be better if I remap the
[ctrl]-key to [alt-key], so I can activate [ctrl] with my thumb.
What have I done?
Tried this: /usr/bin/setxkbmap -option "ctrl:alt_R" Not working.
Tried this: /usr/bin/setxkbmap -option "ctrl:Meta_R" Not working.
Tried the .xmodmap configuration. I start xev, pressed the right [alt] key
and it gives me keycode 108. [ctrl] gives me 37. So i create up ~/.Xmodmap
and map: keycode 108 = Control_L and reboot. Not working.
I've searched through the forums a lot, but have not found a solution. Any
suggestions how manage the right Alt+key behave as [ctrl]-key?
Thanks in advance for your appreciated help.
================== Edit: found the answer! Without the open source spirit,
I would never able to find my way here. And everyone benefits too!
The answer is..... bumbumbrrrrr...
setxkbmap -option ctrl:ralt_rctrl :D

No comments:

Post a Comment