Cap icon indicating copy to clipboard operation
Cap copied to clipboard

"Record an area" shortcut takes screenshots after "Screenshot an area" has been used

Open sheeesh3 opened this issue 1 month ago • 1 comments

Description

I have "Screenshot an area" on ⌘⇧S and "Record an area" on ⌘⇧R. Once I've used ⌘⇧S, ⌘⇧R opens the area picker but takes a screenshot when I release the selection. It doesn't record.

I can see this follows the design. The "Record a …" shortcuts use the current mode, and the Shortcuts page says so:

Shortcuts settings in Screenshot mode: Record an area, Record a window and Record a display all say they take a screenshot

The problem is that "Screenshot an area" switches the mode to Screenshot as a side effect and leaves it there:

https://github.com/CapSoftware/Cap/blob/f7d3516110062e2fe24a3fc54031921e19cd8983/apps/desktop-gpui/src/hotkeys.rs#L905-L910

https://github.com/CapSoftware/Cap/blob/f7d3516110062e2fe24a3fc54031921e19cd8983/apps/desktop-gpui/src/hotkeys.rs#L885

So with one shortcut for screenshots and one for recordings, the record shortcut stops recording as soon as you take a screenshot. Nothing on screen warns you, and the shortcut is still called "Record an area". To record again you have to open the main window and switch back to Studio or Instant.

I expected each shortcut to do what its name says, no matter which shortcut I used before.

Two possible fixes:

  1. The "Screenshot a …" shortcuts take their screenshot without leaving the mode set to Screenshot. Picking Screenshot in the main window would still make the picker take screenshots, as it does now.
  2. When the mode is Screenshot, the "Record a …" shortcuts switch to Studio before opening the picker (an Instant user stays in Instant). This is like how Start Studio/Instant Recording set their own mode.

I'd be happy to open a PR for whichever you prefer.

Reproduction

  1. Bind "Screenshot an area" and "Record an area" to two shortcuts, with Cap in Studio mode.
  2. Press the "Screenshot an area" shortcut and take a screenshot.
  3. Press the "Record an area" shortcut and draw an area.
  4. Cap takes a screenshot instead of recording.

Additional Context

  • Cap version: 0.6.2
  • Operating system, version: macOS 27.0.1
  • Device (optional): MacBook Pro, M1 Pro

From the log, the "Record an area" shortcut followed by a screenshot:

INFO cap_gpui::hotkeys: global hotkey action=OpenRecordingPickerArea
INFO cap_gpui::screenshot: taking a screenshot kind="Area"
INFO cap_gpui::screenshot: screenshot captured path=…/screenshots/… (Area) 2026-10-31 01.02 AM.cap/original.png

sheeesh3 avatar Oct 30 '26 19:10 sheeesh3

CAP-960

linear[bot] avatar Oct 30 '26 19:10 linear[bot]