You are not logged in.

#1 2016-10-11 01:23:00

dakota
Member
Registered: 2016-05-20
Posts: 415

[SOLVED] Wrong Keybord Layout with Wireless Keyboard

The solution was right under my nose... once I figured out what to search for!

Logitech Unifying Receiver

Added the following line to my .xinitrc file

setxkbmap -layout us -variant dvorak &

==================

My system had been running well, but then I spilled water on the keyboard and ruined it. sad

I purchased 2 new keyboards:

Microsoft -- Ergonomic 4000 USB keyboard (a direct replacement)
Logitech -- MK520 wireless keyboard and mouse

Environment
Linux 4.7.6-1-ARCH
Display Manager = none
Desktop environment = none
Window manager = fluxbox
Keyboard layout = us
Keyboard variant = Dvorak

I boot my system to console, and then issue the command 'startx' to enter the graphical environment.

Problem
The wireless keyboard sometimes uses Qwerty and sometimes uses Dvorak. (The USB keyboard always uses Dvorak.)

Symptoms
1. When I boot to the console, both keyboards use Dvorak.
2. After entering X, the USB keyboard uses Dvorak, but the wireless keyboard uses Qwerty.

Peculiarities
1. If I boot to X using the USB keyboard, and then switch to the wireless keyboard, the wireless keyboard will use Dvorak.
2. If the wireless keyboard is using Dvorak, but I exit and then re-enter X, the wireless keyboard defaults back to Qwerty.
3. If the wireless keyboard is using Qwerty and I unplug it (remove the adaptor) and plug it back in, it continues to use Qwerty.
4. If the wireless keyboard is using Qwerty and I cycle power on the keyboard, it continues to use Qwerty.
5. If the wireless keyboard is using Qwerty and I unplug it and plug in the USB keyboard, the USB keyboard uses Dvorak. If I then unplug the USB keyboard and plug the wireless keyboard back in, the wireless keyboard will use Dvorak!
6. If the wireless keyboard is using Qwerty and I plug the USB keyboard into a different USB slot, then the wireless keyboard continues to use Qwerty. However, if I type some characters on the USB keyboard (it types in Dvorak) and then type some characters on the wireless keyboard, then the keyboard switches to Dvorak.

Settings

$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us
variant:    dvorak
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us(dvorak)+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us(dvorak)+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};
$ localectl status
   System Locale: LANG=en_US.UTF-8
       VC Keymap: dvorak
      X11 Layout: n/a
$ localectl list-keymaps | grep dvorak
ANSI-dvorak
dvorak
dvorak-ca-fr
dvorak-es
dvorak-fr
dvorak-l
dvorak-la
dvorak-programmer
dvorak-r
dvorak-ru
dvorak-sv-a1
dvorak-sv-a5
dvorak-uk
mac-dvorak
no-dvorak
sundvorak
$ localectl set-keymap dvorak
This did not change the wireless keyboard behavior
$ nano /etc/X11/xorg.conf
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "glx"
EndSection

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbVariant" "dvorak"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
       ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "HWcursor"                  # [<bool>]
        #Option     "NoAccel"                   # [<bool>]
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "VideoKey"                  # <i>
        #Option     "WrappedFB"                 # [<bool>]
        #Option     "GLXVBlank"                 # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        #Option     "PageFlip"                  # [<bool>]
        #Option     "SwapLimit"                 # <i>
        #Option     "AsyncUTSDFS"               # [<bool>]
        #Option     "AccelMethod"               # <str>
        Identifier  "Card0"
        Driver      "nouveau"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "VideoKey"                  # <i>
        #Option     "WrappedFB"                 # [<bool>]
        #Option     "GLXVBlank"                 # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        #Option     "PageFlip"                  # [<bool>]
        #Option     "SwapLimit"                 # <i>
        #Option     "AsyncUTSDFS"               # [<bool>]
        #Option     "AccelMethod"               # <str>
        Identifier  "Card0"
        Driver      "nouveau"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Last edited by dakota (2016-10-11 02:37:17)


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

Board footer

Powered by FluxBB