The MT2 uses a compact report format, but otherwise is similar in many
ways to the internal trackpads, it even uses the same mode switching
commands.
Reviewed by: wulf
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D34437
hid_input is equal to 0. It is leftover from NetBSD code.
Reviewed by: hselasky, wulf
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D28149
FreeBSD-9 had introduced support for the full set of Unicode
characters to the parsing and processing of keymap character tables.
This support has been extended to cover the table for accented
characters that are reached via dead key combinations in FreeBSD-13.2.
New ioctls have been introduced to support both the pre-Unicode and
the Unicode formats and keyboard drivers have been extended to support
those ioctls.
This commit makes the ABI compatibility functions in the kernel
optional and dependent on COMPAT_FREEBSD13 in -CURRENT.
The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has
been made ABI compatible with old kernels to allow a new world to be
run on an old kernel (that does not have full Unicode support for
keymaps).
This commit is not to merged back to 12-STABLE or 13-STABLE. It is
part of review D38465, which has been split into 3 separate commits
due to different MFC and life-time requirements of either commit.
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D38465
Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key combinations, and those were still restricted to 8 bit codes.
This update to kbd.c adds support for Unicode characters and
compatibility code that allows a kbdcontrol command built from kbio.h
without these patches to work on a new kernel.
Compatibility code that allows a new kbdcontrol binary running on an
old kernel to load and display the dead key map will be committed in a
separate commit.
Reviewed by: imp, brooks
Approved by: brooks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38381
Some Elantech trackpads have a mangled HID report descriptor, which
reads as having an incorrect input size (i.e. < IETP_REPORT_LEN_LO).
If the input size is incorrect, load a dummy report descriptor.
Reviewed by: wulf
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38387
for all devices except Kensington Slimblade Trackball as it brokes
some other devices like Contour Rollermouse Red
Add a quirk for it as well.
Reported by: Atte Peltomäki <koston_AT_iki_DOT_fi>
PR: 267922
MFC after: 2 weeks
of various keyboard drivers.
EVIOCGRAB ioctl execution on /dev/input/event# device node gains
exclusive access to this device to caller. It is used mostly for
development purposes and remote control software. See e.g.
https://reviews.freebsd.org/D30020 which is the reason of creation
of this change.
Keyboard grabbing is disabled in KDB and during panics.
MFC with: 4a0db5e292
Tested by: corvink
Differential revision: https://reviews.freebsd.org/D30542
Make HIDIOCGRAWPHYS, HIDIOCGRAWNAME, and HIDIOCGRAWUNIQ return
the length of the copied out string (including the trailing NUL
character), so they behave like their Linux hidraw counterparts.
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D35233
hid_ioctl method executes arbitrary transport backend command.
Format of the command is defined by hardware transport driver.
It is intended to assist HID device drivers to execute non-HID commands
on hybrid devices like Elan and Apple touchpads which can be switched
between HID and proprietary modes.
MFC after: 2 month
Now that we have proper 32-bit compat support, remove COMPAT_32BIT
ifdefs to allow 32-bit code to use the 64-bit layout of USB ioctl
structs and struct usb_fs_endpoint.
This includes the removal of redundant alignment directives that had
no effect in practice.
Reviewed by: hselasky, jrtc27 (prior version)
Use thunks or alternative access methods to support ioctls without
the COMPAT_32BIT hacks that store pointers in uint64_t's on 32-bit
platforms. This should allow a normal i386 libusb to work.
On CheriBSD, the sizes of the structs will differ between CheriABI
(the default) and freebsd64 no matter what so we need proper compat
support there. This change paves the way.
Reviewed by: hselasky, jrtc27 (prior version)
Add bus_topo_assert() and implmement it as GIANT_REQUIRED for the
moment. This will allow us to change more easily to a newbus-specific
lock int he future.
Sponsored by: Netflix
Reviewed by: wulf, mav, jhb
Differential Revision: https://reviews.freebsd.org/D31833
Currently hkbd counts all key states to be "Up" at the start of
interrupt callback. That results in generation of "Key Up" event for
each key that has been downed before but is not listed in current
report while is still downed.
Fix that with clearing of temporary key data storage bits only for
keys contained in processed report.
Reported by: Greg V
Obtained from: sysutils/iichid
MFC after: 2 weeks
"maximum number of contacts" usages.
Assume touchpad to be a clickpad if it has only internal button.
Set number of contacts to 5 for touchpads and to 10 for touchscreens.
Check for fetched report length to avoid reading of stalled data.
Fixes Dell Precision 7550 laptop.
Tested by: Shawn Webb <shawn.webb_AT_hardenedbsd_DOT_org>
PR: 257992
MFC after: 2 week
In Serial mode, each packet contains information that describes a
single physical contact point. Multiple contacts are streamed
serially. In this mode, devices report all contact information in a
series of packets. The device sends a separate packet for each
concurrent contact.
Serial packet reporting mode is used by post-2014 eGalax touchscreens.
Tested by: Mark Kane <mark_AT_kane_DOT_mn>
MFC after: 2 weeks
Some devices like eGalax touchscreens use value of 0x33 instead of 0x13
for inches as unit of measure.
Reported by: Mark Kane <mark_AT_kane_DOT_mn>
MFC after: 1 week