GNOME Bugzilla – Bug 586130
(shutter) button support via /dev/input/event
Last modified: 2009-06-18 09:51:03 UTC
This is a patch which enables shutter buttons of web camera. uvcvideo driver exports such shutter buttons via /dev/input/event. If a v4l devier doesn't export such dev file, my patch does nothing; kernel hacking may be needed.
Created attachment 136832 [details] [review] A patch fixing the issue.
Hi Masatake, thanks for your patch, isn't it a bit an overkill to directly watch the device? Shoudln't we just listen to XF86Webcam key as suggested in bug #521551 ? I'm pretty sure Bastien wrote a couple of kernel patches to make webcam drivers use KEY_CAMERA and make it work properly so at this time the only thing missing should just be the listening code in cheese. CC-ing Bastien for a confirm.
Definitely the wrong way to do this. The only thing you'd need to do is capture "XF86WebCam" using normal X APIs. No need to go hard-coding Linux specifics. If particular webcams don't use KEY_CAMERA for those cases, the drivers should be fixed instead of working around it in user space.
Can I observe the XF86WebCam event with xev command?
Sure you can, I just tested it with my UVC webcam.
Extra setting for X or something is needed? My UVC webcam doesn't say anthing.
Check with evtest first that your webcam is giving out a key event (and which one). If it gives out KEY_WEBCAM, then it's a problem with the X setup, if it doesn't then it's a problem with the kernel driver for it. Works out-of-the-box for me with a UVC webcam on Fedora 11.
I have confirmed XF86WebCam event is delivered with xev. (I used a bit old system.) I will rewrite my patch to use the event. Thanks.
thanks a lot to YOU for your effort!
Please do so in bug 521551, which is already about that...