Hi Melchior, On Wednesday 02 December 2009 18:10:56 Melchior FRANZ wrote: > * Melchior FRANZ -- Tuesday 01 December 2009: > > $ evtest /dev/input/event6 > > Most of you probably knew this (especially those who coded it :-), but I > only realized later: The snapshot button isn't only reported via kernel > event, but is also sent as a regular X key event. It has keycode 187, but > no keysym assigned. I get this in xev: > > KeyPress event, serial 29, synthetic NO, window 0x9400001, > root 0x13c, subw 0x0, time 6746485, (113,93), root:(759,93), > state 0x0, keycode 187 (keysym 0x0, NoSymbol), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > I didn't find a reserved keysym for webcam snapshot buttons.
What about XF86WebCam ? > Is there any software that listens to that by default? Not that I know of, but depending on the desktop environment you're using, you could probably map the key to a global shortcut. > In the meantime I just assigned letter "s" to the key (by adding this to the > ~/.Xmodmap: "keycode 187 = s"). Now at least luvcview knows how to take > snapshots. Unfortunately, the key is only reported when the camera is > already in recording mode. It used to be reported all the time, but that broke power management. To report button events the device needs interrupt URBs, and keeping them flying over USB prevents the device from being auto-suspended. The camera doesn't need to stream video to report button events. Holding the video device node (/dev/videoX) open is enough. It should be quite trivial to write an application that opens the device node and then sleeps forever. -- Regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel