summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-keyboard.c
AgeCommit message (Collapse)Author
2015-06-02udev: add some assertsTom Gundersen
Mostly for documentation purposes.
2015-05-11treewide: Correct typos and spell plural of bus consistentTorstein Husebø
2015-04-21udev: keyboard-builtin: Add support for setting IBM trackpoint sensitivityHans de Goede
IBM / Lenovo trackpoints allow specifying a sensitivity setting through a ps/2 command, which changes the range of the deltas sent when using the trackpoint. On some models with normal usage only deltas of 1 or 2 are send, resulting in there only being 2 mouse cursor movement speeds, rather than the expected fluid scale. Changing the sensitivity to a higher level than the bootup default fixes this. This commit adds support for setting a POINTINGSTICK_SENSITIVITY value in hwdb to allow changing the sensitivity on boot through udev / hwdb.
2015-04-12udev-builtin-keyboard: make error messages more standardZbigniew Jędrzejewski-Szmek
- No need to add "Error, " prefix, we already have that as metadata. - Also use double quotes for path names, as in most other places. - Remove stray newline at end of message. - Downgrade error messages after which we continue to warnings.
2015-04-11udev: builtin-keyboard: add support for EVDEV_ABS_*Peter Hutterer
Parse properties in the form EVDEV_ABS_00="<min>:<max>:<res>:<fuzz>:<flat>" and apply them to the kernel device. Future processes that open that device will see the updated EV_ABS range. This is particularly useful for touchpads that don't provide a resolution in the kernel driver but can be fixed up through hwdb entries (e.g. bcm5974). All values in the property are optional, e.g. a string of "::45" is valid to set the resolution to 45. The order intentionally orders resolution before fuzz and flat despite it being the last element in the absinfo struct. The use-case for setting fuzz/flat is almost non-existent, resolution is probably the most common case we'll need. To avoid multiple hwdb invocations for the same device, replace the hwdb "keyboard:" prefix with "evdev:" and drop the separate 60-keyboard.rules file. The new 60-evdev.rules is called for all event nodes anyway, we don't need a separate rules file and second callout to the hwdb builtin.
2015-04-11udev: builtin-keyboard: invert a conditionPeter Hutterer
No functional changes, just to make the next patch easier to review
2015-04-11udev: builtin-keyboard: move actual key mapping to a helper functionPeter Hutterer
No changes in the mapping, but previously we opened the device only on successful parsing. Now we open the mapping as soon as we have a value that looks interesting. Since errors are supposed to be the exception, not the rule, this is probably fine.
2015-04-11udev: builtin-keyboard: immediately EVIOCSKEYCODE when we have a pairPeter Hutterer
Rather than building a map and looping through the map, immediately call the ioctl when we have a successfully parsed property. This has a side-effect: before the maximum number of ioctls was limited to the size of the map (1024), now it is unlimited.
2015-04-11udev: builtin-keyboard: move fetching the device node upPeter Hutterer
No point parsing the properties if we can't get the devnode to apply them later. Plus, this makes future additions easier to slot in.
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-05udevadm,..: make --help output of udev tools more like the output of the ↵Lennart Poettering
various other tools
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-08-05udev-builtin-keyboard: Allow numeric key codesMartin Pitt
Like with the old udev rules, allow hwdb entries to specify numeric key codes. Based on a patch from Mircea Miron. https://launchpad.net/bugs/1247584
2014-06-01udev-builtin-keyboard: do tell on which device EVIOCSKEYCODE failed.Cristian Rodríguez
I am getting "Error calling EVIOCSKEYCODE (scan code 0xc022d, key code 418): Invalid argument", the error message does not tell on which specific device the problem is, add that info.
2013-12-24log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering
including it in the log strings
2013-11-25udev-builtin-keyboard: More useful error messageMartin Pitt
Make the "Error calling EVIOCSKEYCODE" error message more useful by mentioning which scan/key code it tried to set.
2013-11-04udev-builtin-keyboard: Fix large scan codes on 32 bit architecturesMartin Pitt
Use strtoul(), as scan codes are always positive. On 32 bit architectures strtol gives wrong results: strtol("fffffff0", &endptr, 16) returns 2147483647 instead of 4294967280. https://launchpad.net/bugs/1247676
2013-07-10udev: add builtin 'keyboard' to manage key mappingsKay Sievers