You are not logged in.
Pages: 1
Hi,
A script I wrote relies on 'setxkbmap -print' to know what the keyboard layout is (since I sometimes change it).
These days, after a complete reinstall of my system (i.e. all packages up to date) my script sometimes thinks the layout is US:
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+[b]us[/b]+inet(evdev)" };
xkb_geometry { include "pc(pc104)" };
};
but when I actually use my keyboard, the layout is CH (FR) as it should be (characters like é, à and è work). The output of 'setxkbmap -print' should be:
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+[b]ch(fr)[/b]+inet(evdev)" };
xkb_geometry { include "pc(pc104)" };
};
Bottomline is: I don't change my layout (so it is CH (FR) as always) but 'setxkbmap -print' tells me it is US, which is wrong.
This seems to happen quite randomly (sometimes at boot) and the "fix" I have found is to explicitely reset the layout to CH (FR).
Is there a better way than 'setxkbmap -print' to know what is the current layout or is there a way to fix this problem ?
Thank you in advance.
Last edited by yms (2011-09-04 21:34:00)
Sorry for any English mistakes, I am not a native speaker.
Offline
How do you set your kbd layout?
I have 'setxkbmap pl' in my .xinitrc so maybe the layout is different before it runs i.e. when I boot into console. I can't check it right now, but I will later.
Oh, and please use [ code ] tags, not [ quote ] tags for posting snippets of code.
Last edited by karol (2011-09-04 21:27:12)
Offline
At boot, I have:
KEYMAP="fr_CH-latin1"
in my /etc/rc.conf. But then when I need to switch it while working, I use 'setxkbmap bg phonetic', 'setxkbmap ch fr' and whatever I need, always with setxkbmap.
Sorry for any English mistakes, I am not a native speaker.
Offline
Pages: 1