# keyboard problems in X

## tjekke dine lommer

how some of my keys work: (this happens only in X)

alt gr = return 

page up = slash

page down = open menu

the problem is not keyboard layout-specific.

driver is 'kbd'.

----------

## Aquous

Try setting INPUT_DEVICES=evdev in make.conf and reemerging xorg-drivers

----------

## tjekke dine lommer

 *Aquous wrote:*   

> Try setting INPUT_DEVICES=evdev in make.conf and reemerging xorg-drivers

 

that was my initial approach, but the result of that was my mouse & keyboard not working at all in X.

----------

## m0p

Yeah, you need to set the driver in xorg.conf to evdev. Like this:

```
Section "InputClass"

        Identifier      "evdev keyboard catchall"

        Driver          "evdev"

        Option          "XkbModel" "pc105"      

        Option          "XkbLayout" "gb,gr"

        Option          "XkbVariant" ",nodeadkeys"

        Option          "XkbOptions" "altwin:menu,lv3:ralt_switch_multikey,eurosign:e,grp:win_switch"

        MatchIsKeyboard "on"

        MatchDevicePath "/dev/input/event*"

EndSection

Section "InputClass"

        Identifier      "evdev pointer catchall"

        Driver          "evdev"

        Option          "ZAxisMapping" "4 5"

        Option          "Buttons" "7"

        Option          "ButtonsMapping" "1 2 3 6 7"

        Option          "AccelerationScheme" "none"

        MatchIsPointer  "on"

        MatchDevicePath "/dev/input/event*"

EndSection
```

Obviously change the Xkb options to suit you.

Make sure you've got the evdev module or built-in in your kernel as well obviously.

----------

## tjekke dine lommer

ok, reemerged with INPUT_DEVICES="evdev" and changed xorg.conf. the previous problems persist and now insert/delete/home/end and arrow keys are not operational.

first part of usr/share/X11/xorg.conf.d/xorg.conf:

```
Section "ServerLayout"

        Identifier     "X.org Configured"

        Screen      0  "Screen0" 0 0

        InputDevice    "Mouse0" "CorePointer"

        InputDevice    "Keyboard0" "CoreKeyboard"

        Option          "AllowEmptyInput" "false"

EndSection

Section "Files"

        ModulePath   "/usr/lib/xorg/modules"

        #FontPath     "/usr/share/fonts/dejavu"

        FontPath     "/usr/share/fonts/winfont"

        #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  "dbe"

        Load  "record"

        Load  "dri"

        Load  "extmod"

        Load  "glx"

        Load  "dri2"

EndSection

Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "evdev" #kbd

EndSection

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "evdev" #mouse

        Option      "Protocol" "auto"

        Option      "Device" "/dev/input/mice"

        Option      "ZAxisMapping" "4 5 6 7"

EndSection

```

usr/share/X11/xorg.conf.d/10-evdev.conf: (no idea what this is, maybe useful)

```
#

# Catch-all evdev loader for udev-based systems

# We don't simply match on any device since that also adds accelerometers

# and other devices that we don't really want to use. The list below

# matches everything but joysticks.

Section "InputClass"

        Identifier "evdev pointer catchall"

        MatchIsPointer "on"

        MatchDevicePath "/dev/input/event*"

        Driver "evdev"

EndSection

Section "InputClass"

        Identifier "evdev keyboard catchall"

        MatchIsKeyboard "on"

        MatchDevicePath "/dev/input/event*"

        Driver "evdev"

EndSection

Section "InputClass"

        Identifier "evdev touchpad catchall"

        MatchIsTouchpad "on"

        MatchDevicePath "/dev/input/event*"

        Driver "evdev"

EndSection

Section "InputClass"

        Identifier "evdev tablet catchall"

        MatchIsTablet "on"

        MatchDevicePath "/dev/input/event*"

        Driver "evdev"

EndSection

Section "InputClass"

        Identifier "evdev touchscreen catchall"

        MatchIsTouchscreen "on"

        MatchDevicePath "/dev/input/event*"

        Driver "evdev"

EndSection
```

----------

## m0p

Try setting your XkbLayout and XkbModel for Keyboard0 appropriately. Maybe it's automatically choosing some obscure model that doesn't have those keys?

----------

## tjekke dine lommer

unfortunately that didn't help. 

here's some possibly interesting stuff from Xorg's log:

```
[  1045.719] (**) Option "CorePointer"

[  1045.719] (**) Mouse0: always reports core events

[  1045.719] (**) Mouse0: Device: "/dev/input/mice"

[  1045.719] (EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device

[  1045.719] (II) UnloadModule: "evdev"

[  1045.719] (EE) PreInit returned NULL for "Mouse0"

[  1045.719] (**) Option "CoreKeyboard"

[  1045.719] (**) Keyboard0: always reports core events

[  1045.719] (EE) Keyboard0: No device specified.

[  1045.719] (II) UnloadModule: "evdev"

[  1045.719] (EE) PreInit returned NULL for "Keyboard0"
```

and some stuff X outputs to the console:

```
The XKEYBOARD keymap compiler (xkbcomp) reports:

> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols

>                   Ignoring extra symbols

Errors from xkbcomp are not fatal to the X server
```

----------

## m0p

Oh, you need this in the keyboard section too:

```
MatchIsKeyboard "on" 

MatchDevicePath "/dev/input/event*"
```

Same for mouse but with MatchIsPointer instead.

Try that anyway along with the Xkb settings.

----------

## tjekke dine lommer

sadly:

```
Parse error on line 35 of section InputDevice in file /usr/share/X11/xorg.conf.$

        "MatchIsKeyboard" is not a valid keyword in this section.

(EE) Problem parsing the config file

(EE) Error parsing the config file

```

----------

## Gusar

Drop all your InputDevice sections. Things are configured now in InputClass sections.

----------

