summaryrefslogtreecommitdiff
path: root/sys/dev/hid
AgeCommit message (Collapse)Author
2022-03-13hid: Avoid arithmetic overflow by rearranging inequalities.riastradh
2021-09-22wscons: add definitions for BÉPO, a standardized, Dvorak-style optimizednia
keyboard layout for French
2021-08-07Merge thorpej-cfargs2.thorpej
2021-07-21need <sys/param.h> for COHERENCY_UNITskrll
Minor KNF along the way.
2021-05-11wscons: add support for the Neo 2 German keyboard layoutnia
Neo is an optimized layout for German and English, similar to Dvorak for English. It can be used to type most Latin-based languages and has separate layers for symbols and directional commands.
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2020-08-29provide KB_APPLE layout variant which uses Command-F* to switch console screensmacallan
mostly for consistent behaviour across *Books which may have ADB or USB keyboards
2020-08-26for jp keymap map also scan code 49 to right bracket to handle ARCHISS modeljdolecek
PR kern/55608 by Shinichi Doyashiki
2020-07-13Canadian French keyboard layout for ukbd/pckbdnia
2020-07-13Add keyboard layout for Latin American Spanish to ukbd/pckbdnia
2020-07-12Add Icelandic keyboard layout to ukbd/pckbd.nia
2020-07-12Add KB_TR for uhid keyboards (it was PS/2 only, this seems wrong)nia
2020-07-12Add Estonian layout as a variation of Swedish for ukbd and pckbdnia
2020-07-12Bring br.nodead closer to X11nia
2020-07-12Add support for the Brazilian keyboard layout to pckbd and ukbd.nia
This is significantly different from the European Portugese layout, and was pieced together from Wikipedia, X11 layout files, and to some extent with trial and error. Thanks to lun-4 for helping test this. PR kern/44570
2020-04-24For usb keyboards with encoding *.swapctrlcaps, keep KS_Cmd1 on the samerhialto
key as KS_Control_L. This brings them in line with wskbdmap_mfii.c.
2020-03-11 Use unsgined more.msaitoh
2020-03-08Use unsigned to avoid undefined behavior. Found by kUBSan.msaitoh
2020-03-02Add fido constants, and turn hid "raw" mode for fido devices.christos
2020-01-11Support the combination of KB_SWAPCTRLCAPS and UK layout.nia
2020-01-01Fix small read overflows when parsing HID tables. Noticed by kASan themaxv
other day while I was playing with vHCI.
2019-07-10hidms depends on tpcalib nowmartin
2019-07-09Enable finger touch panel of HP Spectre x360 13-inch ae019TUryoon
2019-07-09Add tpcalib, touch panel calibration to ims(4)ryoon
Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.
2018-11-15Correctly handle signed/unsigned quantities in kernel HID parser.jakllsch
Should fix PR kern/53605.
2018-09-03Rename min/max -> uimin/uimax for better honesty.riastradh
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended. HOWEVER! Some subsystems have #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation. To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it. I have left a handful of bootloaders that are too annoying to compile-test, and some dead code: cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4)) It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them. Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
2018-05-25Fix HIDMS_DEBUG buildryoon
2017-12-10Fix fallout from hid factorisation:bouyer
- need to install sys/dev/hid/hid.h for userland - include it where needed - most of the time in place if usb/usbhid.h
2017-12-10Factor out bus-independant HID code so that it can be shared by USB, bluetoothbouyer
and i2c. dev/usb/ukbdmap.c is renamed to dev/hid/hidkbdmap.c dev/usb/hid.[ch] moved to dev/hid/ usage pages moved from dev/usb/usbhid.h moved to dev/hid/hid.h, and updated with OpenBSD entries. bus-independant code moved from dev/usb/ums.c to dev/hid/hidms.c (the same should be done for keyboard and touchpad drivers) Needed for the upcoming HID over I2C support, proposed on tech-kern@ on Dec, 1.