0

I installed https://flameshot.org/docs/guide/key-bindings/#macos and want to use that when I take screenshots.

I'm using a Logitech USB wireless Windows-style keyboard, so I have a Print Screen key.

When I press the Print Screen key, I want Flameshot to take a screenshot.

At first, I thought I'd be able to map it within Flameshot > Configuration.

When I try, it treats Print Screen as F13.

Flameshot config

Pressing Print Screen still doesn't seem to take a screenshot, though.

Ryan
  • 1,303
  • 3
  • 21
  • 36
  • 1
    Check with Key Codes (freeware) that F13 is recognised there too. This may come down to which way you have your system prefs set, to recognise F-keys as 'true' f-keys, or 'special functions'. If F9 & 10 turn your sound up & down, then you're set to 'special functions', not F-keys, in which case Fn+PrintScreen might work. – Tetsujin Jul 05 '23 at 18:41
  • I see what’s happening here now. Flameshot is looking for F13 specifically. You should be able to just press PrntScr here and have FS detect it. If not, use the answer here to map to an unused key like the right hand Opt/Alt key. See if it works there. Also, do you have an F13 on that Windows keyboard? – Allan Jul 05 '23 at 18:49
  • @Tetsujin I'll check it out. Thanks! – Ryan Jul 05 '23 at 21:54
  • @Allan I have no key labeled as F13. And my "Print Screen" key is directly to the right of my F1 to F12 keys. When I try to map "Print Screen" to "Capture screen" in Flameshot > Configuration, it results in the screenshot above. Pressing my "Print Screen" key still does not actually trigger the "Capture screen" action though. And I've been unable to map "Print Screen" to anything (like "Z") using your script. But your script did work to map "z" to "m", for example. Thanks. – Ryan Jul 05 '23 at 21:58
  • Try mapping (in FS) to something like Shift-PrntScrn (or use another modifier. Am I correct in understanding that when you try to map it to the PrntScrn key, it takes a screen shot? – Allan Jul 06 '23 at 02:43
  • @Allan I wouldn't be surprised if there is a Flameshot bug. This is so bizarre. As I showed above, when I try to map PrntScrn, it shows as F13. But nothing happens when I press F13 (it does not tigger the "Capture screen" action). So then I tried to map Shift-PrntScrn instead. But as soon as I pressed Shift-PrntScrn, it took a screenshot! And it wouldn't let me save that hotkey. I.e. pressing Shift-PrntScrn takes a screenshot even when the hotkey is assigned to F13. Then I even cleared out the F13 hotkey (now "Capture screen" is blank under "Key"), but ... – Ryan Jul 06 '23 at 20:00
  • ... Shift-PrntScrn still takes a screenshot! So, I'm pretty close to what I wanted. I'd love not to need to hold Shift before pressing PrntScrn though. I'll look at https://apple.stackexchange.com/a/461785/53510 and see if there is anything helpful there. – Ryan Jul 06 '23 at 20:01

1 Answers1

0

F13 is not a common key in macOS; it's not even printed on the keyboard of smaller Macs. So I'm not too surprised it isn't working. You can find other discussions online about this.

This is what I would do:

  1. Change Flameshot configuration to be triggered by a common key
  2. Test that the key works as a trigger on your built-in keyboard as a sanity check
  3. Use Logitech software or a tool like Karabiner-Elements to remap your keyboard's key to the common key

It's worth noting macOS has several built-in screenshot modes that have different shortcuts. You'll want to make sure these don't interfere with Flameshot, as macOS will likely take priority. On Ventura 13.4 this can be found in System Settings > Keyboard > Keyboard Shortcuts > Screenshots.

Blake
  • 1
  • 2
    Mac keyboards [& system recognition] goes up to at least F19, if you have a keyboard that has those extra keys. – Tetsujin Jul 05 '23 at 18:38
  • Wow, I did steps 1 and 2, which were a good sanity check. I tried CapsLock. Whether I set it by using my built-in or external keyboard, it successfully showed CapsLock in the hotkey mapping. (Shift-CapsLock also showed correctly.) But regardless of whether I used my built-in or external keyboard for the mapping, pressing the CapsLock (or Shift-CapsLock) on either my built-in or external keyboard had no effect. Yet Shift-PrntScrn still takes a screenshot. So the "Capture screen" hotkey field is completely inert, it seems. – Ryan Jul 06 '23 at 20:05
  • https://github.com/flameshot-org/flameshot/issues/3264 – Ryan Jul 06 '23 at 20:15