For the complete documentation index, see llms.txt. This page is also available as Markdown.

11.4 Human Input Devices

FreeBSD natively supports touchpads with I²C and USB interfaces. This section describes how to disable a touchpad.

Touchpad

Disabling the Touchpad

To disable the touchpad, first find the device identifier of the touchpad in the X Window system. The device name may differ across systems, but touchpad device names typically contain Touchpad or a similar identifier:

$ xinput list
 Virtual core pointer                          id=2    [master pointer  (3)]
    Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
    Windows pointer                           id=6    [slave  pointer  (2)]
 Virtual core keyboard                         id=3    [master keyboard (2)]
     Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
     Windows keyboard                          id=7    [slave  keyboard (3)]

After finding the device ID corresponding to the touchpad (6 in the example), disable it as follows (where 1 means enable, 0 means disable):

$ xinput set-prop 6 "Device Enabled" 0    # Disable input device with ID 6

References

  • fygar256. FreeBSDタッチパッドをoffにする[EB/OL]. Qiita, (2023-03-16)[2026-03-25]. https://qiita.com/fygar256/items/35100d43b096470631d6. A detailed introduction to disabling the FreeBSD touchpad using the xinput tool, providing practical command examples.

Apple Magic Trackpad

The Apple Magic Trackpad 2 provides a precise operating experience based on Force Touch pressure-sensing technology.

On FreeBSD, when the Apple Magic Trackpad is connected via USB, modern versions (15.0 and above) automatically recognize and support it through the new HID driver stack (usbhid/hms), without the need to load additional kernel modules.

This trackpad needs to be used with the libinput input library, and works under both X Window (via the xf86-input-libinput driver) and Wayland desktop environments. Bluetooth wireless usage is currently not supported.

Appendix: Resolving Keyboard and Mouse Driver Issues in 15.0 and Later Versions

If USB keyboards, mice, or touchpads worked properly in versions below 15.0 but experienced driver failures after updating the system to 15.0, refer to the following solution:

Add the following line to the system boot configuration file /boot/loader.conf.local:

This configuration disables the usbhid driver stack to fall back to the legacy drivers, then restart the system.

Problem analysis: The ums (USB Mouse) and ukbd (USB Keyboard) drivers are compiled into the kernel by default in the generic kernel for most architectures, and also exist as loadable modules (e.g., ukbd_load="YES"). After version 15.0, the usbhid driver became the default choice, with higher priority than the traditional ums and ukbd drivers.

The usbhid driver first appeared in FreeBSD 15.0. FreeBSD Code Review D45658 added usbhid, hidbus, and hkbd to the GENERIC kernel configuration for all architectures, and added hms to the arm and powerpc architecture configurations, making the new HID stack driver available by default; the change that set the default value of hw.usb.usbhid.enable from 0 to 1 was proposed by D45659. usbhid has been the system default enabled driver since 15.0.

Given that the project is gradually migrating to the new HID driver stack (hkbd/hms), this issue still requires further investigation into its root cause, and a bug report should be submitted to the FreeBSD project. For details, refer to the relevant report in FreeBSD Journal issue 2021/0708.

Appendix: Fn Key Settings

Last updated