Raspberry Pi
Button / Switch
- Set the GPIO to input mode with pull-up.
- Place 100nF capacitor between GPIO and GND.
- (Optional) Place 10k resistor between GPIO and 3V3.
KMS "Screenshot"
ffmpeg -f kmsgrab -i - -vf "hwdownload,format=bgr0" screenshot.png