Spis treści

FreeBSD EVDEV

Wymagania:

Kernel

Trzeba przebudować kernel z dodanymi opcjami:

# evdev interface 
device          evdev           # input event device support
options         EVDEV_SUPPORT   # evdev support in legacy drivers
#options         EVDEV_DEBUG     # enable event debug msgs
#device          uinput          # install /dev/uinput cdev
#options         UINPUT_DEBUG    # enable uinput debug msgs

Wykomentowane opcje są opcjonalne.

System

W zależności do sysctl-a kern.evdev.rcpt_mask mogą być eksponowane następujące typy urządzeń:

    bit 0: is set enables sysmouse
    bit 1: is set enables kbdmux
    bit 2: is set enables ums
    bit 3: is set enables atkbd, ukbd

Domyślne ustawienie sysctl-a to kern.evdev.rcpt_mask=3 co oznacza 0011 (włączone na bit 0 i bit 1). Zmieniamy tę wartość by eksponować tylko ums i ukbd, czyli 1100 (włączone na bit 2 i bit 3). Do /etc/sysctl.conf dopisujemy:

kern.evdev.rcpt_mask=12

Xorg

Dorzucamy do systemu paczki:

pkg install xf86-input-evdev evemu

Konfig do xorg.conf:

Section "InputDevice"
      Identifier "Mouse0"
      Driver     "evdev"
      Option     "Device" "/dev/input/event0"
EndSection

Section "InputDevice"
      Identifier "Keyboard0"
      Driver     "evdev"
      Option     "Device" "/dev/input/event1"
EndSection

Odpowiednie ścieżki do device'a wpisujemy po odczytaniu urządzeń przez program evemu-record:

evemu-record