I have this in the end of my .bashrc, for switching to Colemak:
setxkbmap us -variant colemak (this enables backspace, unlike using the keyboard switcher)
However, after suspend the pc forgets this - and I have to type it into a shell again... Any solutions to this?
In Ubuntu the Colemak layout is installed by default so you don't need to resort to .bashrc! You can use the System Settings... -> Keyboard Layout to select the English (Colemak) layout. If you move it to the top of the layout list it'll be your default one. This'll also work for your console since console-setup uses the default X11 settings now.
This layout does enable the CapsLock key as it should. If you're experiencing something else with the Layout tool my guess is that you have an option set that re-remaps the CapsLock key. Check the Options settings and the /etc/default/keyboard file for any Caps-capades. I, for instance, have redefined the CapsLock as my level 5 switcher, which overrides the layout setting since the Options are called after the Layouts afaik.
If you want to make really damn sure your whole system is Colemak-oriented you could also edit the /etc/default/keyboard file to define the LAYOUT us, VARIANT colemak as your default. Then choosing "revert to defaults" in the Layout tool should preserve Colemak. But in my experience the default file isn't always effective and I'm trying to figure out where else the settings may be hidden...
Last edited by DreymaR (08-Jan-2012 12:12:39)
hmmm... You're right... But I just think there was some keyboard combination that didn't work with the keyboard switcher... I think in combination with CTRL, or ALT or WINDOWS, possible also with SHIFT, then I discovered that it was still QWERTY even though it should be Colemak-layout. And THAT's why I began using:
setxkbmap us -variant colemak
in my .bashrc, as this (AFAIR) solved the CTRL/ALT/whatever problem.... Is this right, that the keyboard launcher lacks some functionality using multiple combination of CTRL/ALT/something? And is it not right that
setxkbmap us -variant colemak
Is more "robust" ?
Hm, could you try to go back to the non-.bashrc solution and find out what the specific problem is? It's kinda vague right now, and I don't even know what the "keyboard launcher" is.
Either way, .bashrc is not the "correct" solution. .bashrc relates to... well... bash, which means that you have to start bash for your system to switch layout. That does not seem very robust to me.
I found that setting the layout in the Keyboard Preferences is more robust, especially with "Apply System-Wide...". That way, you'll have Colemak before you log-in as well, and even in Virtual Terminals with newer versions of various things (I don't know exactly which ones, but it works in Ubuntu 11.10, iirc).
Ok, I went back to the solution you recommend. What I call "keyboard launcher" is a little icon in the top of my screen, where I can change keyboards. I think I enabled it in Keyboard Preferences. Maybe it's called "keyboard switcher" instead....
Anyway: OMFG... I just remember now, why I used the .bashrc-solution:
It *IS* more robust, because I use this java-program (I think it's built on java) a lot - which is called Matlab - and there are two cases:
1) Using my own advice with .bashrc (and "setxkbmap us -variant colemak")
2) Using your advice with keyboard switcher
Here's the result:
1) CTRL + "n" (n with the colemak layout) creates a new window just like it should. CTRL + "s" (s with the colemak layout) saves the file just as it should!
2) The above only works if I press CTRL + push the keys on the ASCII-layout! This is too stupid... I cannot remember to use ASCII-layout when I hold down CTRL and otherwise use Colemak-layout. But with "setxkbmap us -variant colemak" the CTRL key combination works flawlessly.
That's why I use "setxkbmap us -variant colemak" in my .bashrc and now I want to ask, how to automatically run this command: "setxkbmap us -variant colemak" after wakeup from suspend?
Try it out for yourself - I think Java don't like CTRL + Colemak with the fragile solution you seem to be using (this post explains why setxkbmap is more robust, from my point of view)...
Uuhm, but you're right... It's stupid that I have to open a terminal window when I startup the pc, just to run .bashrc...
Please also advice on that issue, thank you very much! :-)
And here's another problem with the ubuntu keyboard switcher:
In emacs, the caps lock continues to partly work as caps lock and partly as backspace, meaning that 1 backspace-click turns on some highlighting mode, while another backspace-click turns it off. This on/off-thing is completely stupid...
As I've previously written, everything is more robust with "setxkbmap us -variant colemak" - there are absolutely no issues with this method and .bashrc in terms of malfunctioning "keyboard behaviour" and there is absolutely no "on/off highlighting"-thing going on in emacs as well.
Just to name 2 very important programs, where I want my colemak layout to work 100% and not like a "semi-qwerty"-keyboard with a bit of colemak in it...
Hmmm, I see. But I'll repeat myself: Did you check your /etc/default/keyboard file? Because I'm pretty sure the console-setup looks to that so that your console applications should be getting the setup you have in there. And that's what you want, right?
Aaah, seems like you're right...
/etc/default/keyboard sounts like a fantastic solution - thank you very much... I'll let you (this forum) know if anything arises...