3
Fn
+F6
key combination turns my laptop's integrated web camera on/off. Looking at the dmesg
output, it seems that the webcam (USB device) is being more or less virtually connected/disconnected to/from the USB bus:
usb 1-5: new high-speed USB device number 9 using ehci_hcd
usb 1-5: New USB device found, idVendor=5986, idProduct=0203
usb 1-5: New USB device strings: Mfr=3, Product=1, SerialNumber=0
usb 1-5: Product: BisonCam, NB Pro
usb 1-5: Manufacturer: Bison Electronics Inc.
uvcvideo: Found UVC 1.00 device BisonCam, NB Pro (5986:0203)
input: BisonCam, NB Pro as /devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/input/input14
usb 1-5: USB disconnect, device number 9
The first seven lines come after "connect" and the last line is after "disconnect" event. dmesg
timestamps removed for clarity.
showkey
executed from a tty console returned keycode 214, xev
from KDE returned keycode 220 and also XF86WebCam
. Here's the part of xev
output related to pressing the Fn
+F6
:
KeyPress event, serial 40, synthetic NO, window 0x3600001,
root 0xac, subw 0x0, time 78270130, (346,354), root:(348,377),
state 0x0, keycode 220 (keysym 0x1008ff8f, XF86WebCam), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
I've already tried sending the keycode of the Fn
+F6
combination (either 214, 220 or XF86WebCam) using the xdotool
, xvkbd
and xmacro
, but with no success.
Probably the right way to do it is not by using the keycodes at all.
I had to reboot to Win7 and hit Fn+F6 to re-enable my camera (don't know what disabled it in the first place) and then reboot back into Ubuntu. Would love to have a "Ubuntu-only" solution. – copper.hat – 2014-07-06T20:09:37.460
Note: I don't have a real-life use case for this. It's just my curiosity (: So, no workarounds like disabling/enabling the driver and/or the USB hub are of any help. – sm4rk0 – 2013-02-23T23:57:33.847