View previous topic :: View next topic |
Author |
Message |
d3ff n00b
Joined: 01 Sep 2005 Posts: 4
|
Posted: Thu Nov 17, 2005 6:23 pm Post subject: Default keyboard layout flexibility |
|
|
A keyboard configuration question:
Background:
I use the Dvorak layout and my wife uses QWERTY. So whenever I'm working the keys bear no relation to the label. The only problem is that she would need to know enough of the Dvorak layout to login and then change it. She did learn how to drive a manual for me but the Dvorak keyboard layout is a bit further out there.
So as I understand it I have a couple of options:
1. Using QWERTY as default and changing it immediately after logging in. (definitely not preferred)
2. Maybe I can have two Gentoo configurations for the bootloader (GRUB) and select either Dvorak or QWERTY?
Am I looking at this from the wrong angle?
3. Maybe I can implement something such as <left Alt>+<left Shift> (or some other special key combination) to switch layouts prior to logging in?
d3ff |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Thu Nov 17, 2005 6:37 pm Post subject: |
|
|
Moved from Installing Gentoo to Other Things Gentoo.
Not an installation problem. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
coriolan Apprentice
Joined: 21 Apr 2005 Posts: 273
|
Posted: Fri Nov 18, 2005 1:26 pm Post subject: |
|
|
In theory you could add an option to the display manager (login screen) to select the layout. I don't know how to get that in any other than xdm, but I'm sure it's possible in others as well. See: setxkbmap |
|
Back to top |
|
|
d3ff n00b
Joined: 01 Sep 2005 Posts: 4
|
Posted: Sat Dec 10, 2005 8:30 pm Post subject: |
|
|
Thanks for your comment coriolan.
I've been considering the merits of using kdm or a text based method. After some consideration I think that a text based method would be easier to implement.
Here's what I've tried so far:
I wrote a script keylayselect
Code: | #!/bin/bash
# Script keylayselect uses Bourne Again SHell
# Script to request keyboard layout at startup.
# Call from local.start
echo "Please select the appropriate keyboard layout:
Type '1' for Dvorak
Type '2' for QWERTY"
layout=""
read -n 1 -p "Enter number:" -t 30 layout
echo
if [ "$layout" = "1" ]
then
echo "Loading Dvorak keyboard layout."
loadkeys dvorak
elif [ "$layout" = "2" ]
then
echo "Loading QWERTY keyboard layout."
loadkeys us
elif [ "$layout" != "1" ]&&[ "$layout" != "2" ]
then
echo "No change to existing layout."
fi
exit 0
|
I've placed keylayselect in /bin/
I've added keylayselect to local.start
It appears to function. However, loadkeys does not actually change the layout (despite echoed information that leads me to believe it does).
1. Is loadkeys the wrong command to use here?
2. Where should I store scripts? I don't like the idea of it being in /bin because it's a script. Or is it normal to store scripts in /bin?
If I create a folder for scripts I would then have to add it to the PATH global environmental variable. I just want to know if there is a customary location for scripts such as these.
Thanks in advance for any help. _________________ 1101 0011 1111 1111 |
|
Back to top |
|
|
d3ff n00b
Joined: 01 Sep 2005 Posts: 4
|
Posted: Sat Dec 10, 2005 9:57 pm Post subject: |
|
|
New information:
xorg.conf overrides loadkeys. I can infer from this that loadkeys only applies to console.
If I modify xorg.conf as follows:
Code: | Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "AutoRepeat" "500 30"
Driver "kbd"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbModel" "compaqik18"
# Option "XkbLayout" "dvorak"
EndSection |
The default returns to QWERTY regardless of the loadkeys status.
Therefore I'm concluding that I would have to write a script that either substitutes xorg.conf files (I'd have one for each setup) or modifies xorg.conf "XkbLayout" (perhaps comment out the line as above) if I intend to use kdm. I'm guessing that modifying files is a bit more complicated than the simple script that I've written.
I'm also trying to figure out how to modify the XkbLayout within KDE. That is: without returning to console and modifying xorg.conf.
Also not understanding how to apply setxkbmap command:
If I try to change keyboard layout with it in Konsole I get the following:
Quote: | $ setxkbmap -v 10 qwerty
Setting verbose level to 10
locale is C
Warning! Multiple definitions of keyboard layout
Using command line, ignoring X server
Applied rules from xorg:
model: compaqik18
layout: qwerty
Trying to build keymap using the following components:
keycodes: xfree86+aliases(qwerty)
types: complete
compat: complete
symbols: pc/pc(pc105)+pc/qwerty+inet(compaqik18)
geometry: pc(pc104)
Error loading new keyboard description
|
_________________ 1101 0011 1111 1111 |
|
Back to top |
|
|
|