2 added 1301 characters in body
source | link

Probably the right answer is to write an [hwdb] file to override the interpretation of the keycode KEY_CAMERA into KEY_SPACE. This seems to be an example, but it is a little lacking in details.

The format of the file is mostly described in a comment at the head of the file /usr/lib/udev/hwdb.d/60-keyboard.hwdb (on my system), and you can see some archlinux discussion of that. Beware, this format depends on the release of systemd, so check your own file. You can match your input device with one of 3 patterns:

  • Generic input devices match:

      evdev:input:bZZZZvYYYYpXXXXeWWWW-VVVV

    This matches on the kernel modalias of the input-device, mainly: ZZZZ is the bus-id (see /usr/include/linux/input.h BUS_*), YYYY, XXXX and WWW are the 4-digit hex uppercase vendor, product and version ID and VVVV is an arbitrary length input-modalias describing the device capabilities.

  • AT keyboard DMI data matches:

      evdev:atkbd:dmi:bvn*:bvr*:bd*:svnvendor:pnproduct:pvr*

    vendor and product are the firmware-provided strings exported by the kernel DMI modalias.

  • Input driver device name and DMI data match:

      evdev:name:input device name:dmi:bvn*:bvr*:bd*:svnvendor:pn*

    input device name is the name device specified by the driver, vendor is the firmware-provided string exported by the kernel DMI modalias.

Another possibility is to write a small program to read the webcam event stream, like evtest does, and when the key is seen, inject a KEY_SPACE into the other event stream. There seems to a lot more documentation on this, and many Python examples like this tutorial snippet to inject an event.

Probably the right answer is to write an [hwdb] file to override the interpretation of the keycode KEY_CAMERA into KEY_SPACE. This seems to be an example, but it is a little lacking in details.

Another possibility is to write a small program to read the webcam event stream, like evtest does, and when the key is seen, inject a KEY_SPACE into the other event stream. There seems to a lot more documentation on this, and many Python examples like this tutorial snippet to inject an event.

Probably the right answer is to write an [hwdb] file to override the interpretation of the keycode KEY_CAMERA into KEY_SPACE. This seems to be an example, but it is a little lacking in details.

The format of the file is mostly described in a comment at the head of the file /usr/lib/udev/hwdb.d/60-keyboard.hwdb (on my system), and you can see some archlinux discussion of that. Beware, this format depends on the release of systemd, so check your own file. You can match your input device with one of 3 patterns:

  • Generic input devices match:

      evdev:input:bZZZZvYYYYpXXXXeWWWW-VVVV

    This matches on the kernel modalias of the input-device, mainly: ZZZZ is the bus-id (see /usr/include/linux/input.h BUS_*), YYYY, XXXX and WWW are the 4-digit hex uppercase vendor, product and version ID and VVVV is an arbitrary length input-modalias describing the device capabilities.

  • AT keyboard DMI data matches:

      evdev:atkbd:dmi:bvn*:bvr*:bd*:svnvendor:pnproduct:pvr*

    vendor and product are the firmware-provided strings exported by the kernel DMI modalias.

  • Input driver device name and DMI data match:

      evdev:name:input device name:dmi:bvn*:bvr*:bd*:svnvendor:pn*

    input device name is the name device specified by the driver, vendor is the firmware-provided string exported by the kernel DMI modalias.

Another possibility is to write a small program to read the webcam event stream, like evtest does, and when the key is seen, inject a KEY_SPACE into the other event stream. There seems to a lot more documentation on this, and many Python examples like this tutorial snippet to inject an event.

1
source | link

Probably the right answer is to write an [hwdb] file to override the interpretation of the keycode KEY_CAMERA into KEY_SPACE. This seems to be an example, but it is a little lacking in details.

Another possibility is to write a small program to read the webcam event stream, like evtest does, and when the key is seen, inject a KEY_SPACE into the other event stream. There seems to a lot more documentation on this, and many Python examples like this tutorial snippet to inject an event.