summaryrefslogtreecommitdiff
path: root/sys/dev/hid
AgeCommit message (Collapse)Author
2024-10-21Correctly report print screen key in raw mode (i.e. under X); problemMiod Vallat
reported by kirill@
2024-09-01spelling; checked by jmc@, ok miod@ mglocker@ krw@Jonathan Gray
2024-07-02Support numpad on newer macppc Apple PowerBooksGeorge Koehler
This is for newer PowerBooks with ukbd(4), and doesn't affect older models with akbd(4). The Fn key now makes a numpad, 7 8 9 0 - 7 8 9 / = U I O P => 4 5 6 * J K L ; 1 2 3 - M . / 0 . + Also, Fn+F6 is Num Lock. This acts like Num Lock on other USB keyboards, and unlike Num Lock on akbd(4). From jon (at) elytron (dot) openbsd (dot) amsterdam
2024-05-10Make the kernel compile also when turning on debugging.Marcus Glocker
ok mpi@
2024-01-03Enable Apple brightness keys also for archs other than macppc.Tobias Heider
ok kettenis@
2023-11-30Make sure we don't process garbage data as keypresses if the device sends aMiod Vallat
truncated report.
2023-11-22Add support for keyboard backlight hotkeys in wskbd and hook up macppc appleTobias Heider
keyboards. From jon (at) elytron (dot) openbsd (dot) amsterdam with some changes by me ok gkoehler@
2023-08-12Better uwacom(4) support for Intuos S and One S tablets; most of the workMiod Vallat
done by Vladimir Meshcheriakov (first name dot last name at epita somewhere in frogland), thanks! Tested by Peter J. Philipp on Intuos Draw and by espie@ on Intuos S.
2023-07-09Add suspend key support in wskbd and make it work on Apple ARM laptops.Tobias Heider
feedback and ok miod@
2022-11-14include sys/device.h, on some architectures this gets pulled in, but othersTheo de Raadt
(like sparc64) require it explicitly
2022-11-11Debug was accidentally left enabled in previous commit.Matthieu Herrb
2022-11-11Add icc(4) to handle Customer Control keyboards attached to i2c bus.Matthieu Herrb
ok anton@ patrick@
2022-11-11ihidev can pass a buffer larger than the size of the claimed inputAnton Lindqvist
report since it unconditionally uses the size of the longest input report. This is quite harmless and the defensive check in hidcc can therefore be relaxed and instead only examining the number of expected bytes. ok matthieu@ patrick@
2022-11-11Extract the HID specific pieces from ucc(4) into hidcc. First stepsAnton Lindqvist
toward attaching hidcc over i2c. ok matthieu@
2022-11-09translate Fn+(1-10,-,=) keys to F1-F12 on M1 laptops with a touchbarRobert Nagy
ok kettenis@, miod@
2022-10-16Improve the clickpad/touchpad detection in hidmt.Ulf Brosziewski
If the HID descriptors don't provide a HUD_BUTTON_TYPE property, hidmt should treat all devices as clickpads if they report a "clickpad button", or don't report to have both a left and right external button.
2022-09-16move most of the key combination translation code out of ukbd(4)Robert Nagy
to hidkbd so that it can be re-used by apldc(4) and aplhidev(4) as well this also adds support for apple fn key combinations to aplhidev(4) ok miod@
2022-06-16Add boundary checks to hidms_setup.Ulf Brosziewski
Thanks to Sven M. Hallberg.
2022-05-20Rename hid_none to hid_all as it represents all possible hid kinds byAnton Lindqvist
now.
2022-05-20uhid_maxrepid() is currently not able to observe all report IDs as itAnton Lindqvist
passes hid_none as the wanted hid kind to hid_start_parse(). This becomes a problem for descriptors with multiple report IDs per collection. Therefore change the semantics of the hid_none kind to let it represents all possible kinds. Gets rid of "uhidev_intr: bad repid" console spam as reported by sthen@ on bugs@. Have been in snaps for a week.
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2021-09-01Add support for the more rare volume usage which differs compared to theAnton Lindqvist
more common volume increment/decrement usages in which each volume change direction is represented using a distinct usage. The volume usage instead uses bits of the interrupt buffer to represent the wanted volume. The same bits should be within the bounds given by the logical min/max associated with the HID item. However, the volume is not interpreted as an absolute value but rather just looking at the sign bit in order to determine the volume change direction. I couldn't find any documentation of this usage and the implementation is therefore solely based on analysing actual data from Richard Toohey's <richardjtoohey at gmail dot com> Dell keyboard.
2021-08-20add consumer control hid usages, will be used by ucc(4)anton
2021-06-10Don't skip mouse attachment if an otherwise qualified report doesn'tJoshua Stein
include X and Y usages. Some devices put the buttons on one report and X/Y on another, which was causing us to ignore button data. This change will cause attachment of two mouse devices in this case, but wsmux and X's handling of input devices will make this transparent. A future change should use [IU]HIDEV_CLAIM_MULTIPLE_REPORTID and attach just one [iu]ms device that claims multiple reports and gets X/Y and button data from whichever report it needs to. But the future is not today. ok gnezdo
2021-01-10add quirks for Kensington Slimblade trackball via new vendor buttonsthfr
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).tobhe
ok kn@
2020-07-09Some touchpads don't have the "maximum number of contacts" orJoshua Stein
"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) providedTheo de Raadt
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 keyboardsJoshua Stein
2020-02-10When walking the HID descriptor, even though we filter for hid_inputPatrick Wildt
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 keysReyk Floeter
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).YASUOKA Masahiko
ok jcs
2018-09-05Back out 1.4, it broke thingsJoshua Stein
2018-09-01For touchscreen devices, use the first HUG_X/Y usage pages foundJoshua Stein
when looking for logical min/max of screen. ok kettenis
2018-08-25Add umt(4) for USB Windows Precision Touchpad devicesJoshua Stein
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 ihidevJoshua Stein
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 stopJoshua Stein
claiming to be elantech devices
2017-10-10hidmt: send input mode set report as 2 bytes, matches linuxJoshua Stein
tested by a few
2017-10-10hidmt: add support for hybrid packet mode used by some touchpadsJoshua Stein
2017-10-10hidmt: rename internal hidmt_input struct to hidmt_data, avoid clashJoshua Stein
with hidmt_input function
2017-10-08Adapt hidmt to the MT interface of wsmouse, and add the compat-mode setup.Ulf Brosziewski
ok mpi@, jcs@
2017-05-30Use memmove() instead of memcpy(), buffers are overlapping.Martin Pieuchot
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)Martin Pieuchot
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.Martin Pieuchot
2017-03-11Introduce a new knob to force the first USB keyboard as console input.Martin Pieuchot
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.Martin Pieuchot
2016-05-22Use the new input functions of wsmouse in mouse and touchscreen drivers.Ulf Brosziewski
ok kettenis@
2016-03-30Add support for multitouch input to wsmouse.Ulf Brosziewski
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.Philip Guenther
Needed by some touchscreens. no objection matthieu@
2016-01-20add hidmt, a HID-layer driver for multitouch touchpads that conformJoshua Stein
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