Cheese as installed allows image capture by left clicking on an icon. Is there any way to initiate an image capture by pressing a key instead?
I believe this question is independent of any specific version of Ubuntu. For those who strictly monitor the requirement to use only supported versions- This question came up while using Ubuntu version 22.04. About cheese shows 41.1
Cheese does not have a keyboard shortcut for the shutter button
Many GUI apps allow keyboard equivalent of mouse actions. This includes Cheese. We can press the TAB to cycle through all the clickable buttons in Cheese. Once we reach the "shutter" button, we press the Enter to click the shutter. On my computer I had to press the TAB key 5 times:
TABTABTABTABTAB and then Enter
Hope this helps
Cheese does not allow capturing image from the command line (AFAIK), so we cannot assign a shortcut to it. Instead, you can use a different software, like
ffmpeg
.First, run the following command, and ensure that it saves an image (in your home folder) with a timestamp.
Closely monitor the output of the command and the generated image. You may have to change
/dev/video0
to/dev/video1
so that your actual webcam's image is captured.Once you ensure it works, open keyboard settings and head on to the shortcuts section. Create a custom shortcut with the name "Capture Webcam image" and enter the command above. After that, assign a suitable key combination (that is already not used for something else, e.g. ctrl + e ).
Afterwards, it should automatically capture when you press ctrl + e .