summaryrefslogtreecommitdiffstats
path: root/sys/dev/hid
AgeCommit message (Collapse)AuthorFilesLines
2021-01-10add quirks for Kensington Slimblade trackball via new vendor buttonsthfr2-14/+30
quirks. Original diff from Sven M. Hallberg < pesco () khjk ! org > Diff updated and tested by Timo Myyra ok phessler@
2020-11-02Enable brightness keys on powerbooks where the keyboard attaches as ukbd(4).tobhe1-2/+4
ok kn@
2020-07-09Some touchpads don't have the "maximum number of contacts" orjcs1-19/+17
"button type" usages, so assume some reasonable defaults rather than failing to attach. Fixes two Dell Latitude laptops and tested in snaps for a bit.
2020-06-04HID parser could overflow if a malicious device (potentially USB) providedderaadt1-5/+8
too many PUSH. report from Andy Nguyen @ google. fix by jcs This is errata 6.6/030_hid and 6.7/008_hid
2020-05-31add umstc(4) for Microsoft Surface Type Cover keyboardsjcs1-1/+6
2020-02-10When walking the HID descriptor, even though we filter for hid_inputpatrick1-1/+3
we will get hid_collection and hid_endcollection items. Since hid_ endcollection apparently returns the usage of the previous item, it was possible that we "see" two items for the same usage. Make sure that we only accept hid_input items. Both hidms and hidkbd do some- thing similar, fixes the Pinebook Pro's trackpad. ok kettenis@
2019-12-17Add fido(4), a HID driver for FIDO/U2F security keysreyk1-1/+7
While FIDO/U2F keys were already supported by the generic uhid(4) driver, this driver adds the first step to tighten the security of FIDO/U2F access. Specifically, users don't need read/write access to all USB/HID devices anymore and the driver also improves integration with pledge(2) and unveil(2): It is pledge-friendly because it doesn't require any ioctls to discover the device and unveil-friendly because it uses a single /dev/fido/* directory for its device nodes. It also allows to support FIDO/U2F in firefox without further weakening the "sandbox" of the browser. Firefox does not have a proper privsep design and many operations, such as U2F access, are handled directly by the main process. This means that the browser's "fat" main process needs direct read/write access to all USB HID devices, at least on other operating systems. With fido(4) we can support security keys in Firefox under OpenBSD without such a compromise. With this change, libfido2 stops using the ioctl to query the device vendor/product and just assumes "OpenBSD" "fido(4)" instead. The ioctl is still supported but there was no benefit in obtaining the vendor product or name; it also allows to use libfido2 under pledge. With feedback from deraadt@ and many others OK kettenis@ djm@ and jmc@ for the manpage bits
2019-11-08Add support for button 2 and 3 to imt(4).yasuoka2-8/+19
ok jcs
2018-09-05Back out 1.4, it broke thingsjcs1-5/+3
2018-09-01For touchscreen devices, use the first HUG_X/Y usage pages foundjcs1-3/+5
when looking for logical min/max of screen. ok kettenis
2018-08-25Add umt(4) for USB Windows Precision Touchpad devicesjcs2-4/+5
Based on imt(4) Rename HIDMT_INPUT_MODE_MT to HIDMT_INPUT_MODE_MT_TOUCHPAD ok deraadt
2018-08-25Move HID->bus constant conversion for HID report types out of ihidevjcs2-5/+14
into hidmt. The HID code uses hid_feature, hid_input, and hid_output constants to refer to report types internally that then need to be converted to their bus-level counterparts before actually getting sent out (so hid_feature becomes UHID_FEATURE_REPORT for USB, I2C_HID_REPORT_TYPE_FEATURE for i2c). This conversion was hard-coded in ihidev but ihidev_[gs]et_report should assume the type passed is already an i2c-level define, not a hid one. This is how uhidev does it. Add a conversion routine callback that any hidmt callers need to set so that hidmt can convert hid constants to the bus-level versions. Also add a similar conversion function to uhidev. ok deraadt
2018-07-30define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stopjcs1-8/+6
claiming to be elantech devices
2017-10-10hidmt: send input mode set report as 2 bytes, matches linuxjcs2-5/+5
tested by a few
2017-10-10hidmt: add support for hybrid packet mode used by some touchpadsjcs2-5/+29
2017-10-10hidmt: rename internal hidmt_input struct to hidmt_data, avoid clashjcs2-7/+7
with hidmt_input function
2017-10-08Adapt hidmt to the MT interface of wsmouse, and add the compat-mode setup.bru2-50/+124
ok mpi@, jcs@
2017-05-30Use memmove() instead of memcpy(), buffers are overlapping.mpi1-2/+2
From Coverity via NetBSD via miod@ ok claudio@, tedu@, deraadt@, krw@
2017-05-12Introduce a new keyboard console hook to enter ddb(4) and make ukbd(4)mpi1-14/+1
use it. Instead of defering every input of a USB console keyboard to a timeout via a queue of one element, only differ entering ddb(4) once a matching control sequenece has been typed. This prevent loosing inputs when a USB console keyboard is "too fast". Fix a problem reported by matthieu@, Adam McDougall and Hrvoje Popovski. ok stsp@, dlg@
2017-05-10Make this compile with HIDKBD_DEBUG defined.mpi1-5/+5
2017-03-11Introduce a new knob to force the first USB keyboard as console input.mpi1-14/+1
By setting "machdep.forceukbd=1" you can now use your USB keyboard in ddb(4) even if your BIOS emulates a pckbd(4). ok tom@, kettenis@, deraadt@
2016-09-12Define for HUP_WACOM, missed in previous.mpi1-1/+2
2016-05-22Use the new input functions of wsmouse in mouse and touchscreen drivers.bru1-10/+13
ok kettenis@
2016-03-30Add support for multitouch input to wsmouse.bru1-10/+5
This change adds new input-processing functions to wsmouse and adapts the touchpad drivers. ok mpi@, shadchin@
2016-02-10Permit negative x and y coordinates in mouse.scale for uts and ums.guenther1-3/+3
Needed by some touchscreens. no objection matthieu@
2016-01-20add hidmt, a HID-layer driver for multitouch touchpads that conformjcs4-3/+519
to the "Windows Precision Touchpad" standard. when a compatible device is found, hidmt claims all report ids and switches the device into multitouch packet mode. add imt, an i2c-HID driver that sits between ihidev and hidmt
2016-01-20add hid_get_udatajcs2-7/+25
code from FreeBSD, name from NetBSD
2016-01-08protect structs in hid.h with #ifdef _KERNEL, to allow inclusion injcs1-1/+5
libusbhid
2016-01-08Move HID support files out of dev/usb into new dev/hid directoryjcs8-0/+2403
These files aren't USB-specific and were used by the previous Bluetooth implementation, and will be used by the upcoming HID-over-i2C implementation ok deraadt previous version ok kettenis and mpi