flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.5k stars 1.57k forks source link

[Feature Request] Remap print-screen activation key on Windows #1341

Open T3rminat0r opened 3 years ago

T3rminat0r commented 3 years ago

I'd love to modify the Shortcut used for a Screencapture on windows (flameshot already running)

Flameshot-Version: 0.8.4 (couldn't find any newer Windows MSI package)

OS: Windows 10 (20H2)

I've been using flameshot on Linux, for a long time, and never found a suitable alternative for use on Windows, so, I was happy to find out there's windows versions available, now (didn't check in a while...) On Linux, I just set up a global shortcut (ctrl+y, in my case) to start flameshot gui, and am quite happy with that. On Windows, I can't (easily?) do that (at least I've not found any documentation for it, and plainly calling flameshot.exe gui does nothing) The Windows Flameshot does come with local Shortcuts, though, while it's running... I'd just love to remap the PrintScreen one to a different shortcut (either in the .conf file or via a UI?) Is this still a thing, and I just missed the documentation for it? Is it maybe already planned for a comming release? Or am I just thinking in the wrong direction and the solution to my problem is something else? (please don't say "just press printscreen" ;) )

Thanks for developing this great tool, there literally is none with as great a UX feeling as flameshot.

borgmanJeremy commented 3 years ago

just press printscreen :) (just kidding)

Right now there is not a way to override the printscreen activation on windows. I've tagged this as a future feature request.

borgmanJeremy commented 3 years ago

Believe this is the relevant section of code: https://github.com/flameshot-org/flameshot/blob/b5ca48dde0102a6a6256c65762dffe582d05996e/src/core/controller.cpp#L85

Quite busy with the 0.9 release so I will come back to this later or someone else might tackle it.

dontworryseoul commented 3 years ago

I'd love to modify the Shortcut used for a Screencapture on windows (flameshot already running)

I need the feature too.

WeridoLm commented 3 years ago

I need the feature too.thx

WeridoLm commented 3 years ago

I need the feature too.thx

WeridoLm commented 3 years ago

I need the feature too.thx

TroyWilliams3687 commented 3 years ago

I have switched to flameshot on linux (Ubuntu 20.04) earlier this year and quite enjoy it. So I wanted to use it on my windows computer. I wanted to set the shortcuts to match my Linux box (muscle memory and all). I can live with just hitting print screen until this is settled. However, I converted a colleague and he is having trouble. Apparently, the corporate version of onedrive has taken the printscreen key over. Without getting IT involved he can't use flameshot.

I would like to see a configuration option for the keyboard shortcut.

Kin-Zhang commented 3 years ago

Yes! I also think it's necessary for Windows user to config print-screen shortcut

by the way, my PrtSc key didn't remap to flameshot too, so I use it by clicking the logo on the taskbar

NirmalManoj commented 3 years ago

I want to see this feature. I have been using Flameshot on Manjaro for some months now. It is by far the best screenshot tool I have across. It is feature-rich and slick at the same time.

Like @Kin-Zhang, I have also not been able to use Print-Screen shortcut on Windows. Did @Kin-Zhang find a way to fix this? If anyone knows how to fix this, please tell me and also put in the documentation. I think this is a common issue.

Kin-Zhang commented 3 years ago

I want to see this feature. I have been using Flameshot on Manjaro for some months now. It is by far the best screenshot tool I have across. It is feature-rich and slick at the same time.

Like @Kin-Zhang, I have also not been able to use Print-Screen shortcut on Windows. Did @Kin-Zhang find a way to fix this? If anyone knows how to fix this, please tell me and also put in the documentation. I think this is a common issue.

I didn't fix it, but I finally have the PrtSc with flameshot but I don't know why it works and also don't know when it's fix maybe after I restart my computer? actually I don't know.... But now I can use the PrtSc key to activate flameshot.

VijayKM01 commented 3 years ago

I, too, was waiting eagerly for this feature, however was able to finally get PrtScr to bring up the Flameshot gui by disabling a toggle which brings of the screen snipping tool when the PrtScr key is pressed.

I believe the feature to set a print screen shortcut was introduced in a recent Windows update (probably in version 1903) To turn off the new snipping feature keyboard shortcut Select Start > Settings > Ease of Access > Keyboard > Turn off the Print Screen shortcut toggle. After a restart, the PrtScr should bring up the Flameshot gui (ensure that flameshot is running in the background for this to work).

This is what worked for me, but I feel a future Windows update may easily break this workaround, therefore it would be great if the devs could implement the key-remap feature for windows.

P.S. Flameshot is the best screen capture tool i've come across, its especially helpful in this era of online meetings and classes. Kudos to the devs and all the people who've helped in creating and maintaining this amazing FOSS tool.

T3rminat0r commented 3 years ago

@VijayKM01 Using PrtScr for triggering FlameShot works fine. This Issue is about being able to map other triggering Keys, within Flameshot to trigger a capture (For example, I'd like to map CTRL+Y to capture (yes, german layout keyboard, Y is below a)

VijayKM01 commented 3 years ago

Oh, my bad, I misunderstood the issue being discussed, I stumbled across this as I was trying to get PrtScr to bring up the FlameShot gui. Nonetheless, I do believe PrtScr is not in the most convenient spot, and it would be great to have an option for additional key triggers.

adityagovindaraj commented 3 years ago

Yes! I also think it's necessary for Windows user to config print-screen shortcut

by the way, my PrtSc key didn't remap to flameshot too, so I use it by clicking the logo on the taskbar

Yeah, same here. When I use PrtScrn, it opens Windows Screenshot, not Flameshot. I have to use taskbar to open Flameshot.

Rar9 commented 3 years ago

+1 for Windows. I would welcome the possibility to change the PrScrn button to my unused Pause key as it will not require 2 Hands to operate. Lightshot had this possibility, but is misbehaving under windows 11 :-(

RawMew commented 2 years ago

Up for Windows. Theme was opened one year ago, nothing changed since then

borgmanJeremy commented 2 years ago

Up for Windows.

Theme was opened one year ago, nothing changed since then

This isn't helpful. Nothing changes unless you help do the work. There is a PR in progress on this.

mmahmoudian commented 2 years ago

⚠️ I'm going to hide non-constructive comments to unclog this issue (including this comment which will get hidden after some hours so that everyone can see it before that seems we are getting more comments that are not adding anything to this thread, so I'll keep this message visible!)

krokofant commented 2 years ago

Mapping it to PrintScreen works most of the time but some Windows like the "Windows Features" and others it doesn't work. Unfortunately I had to resort to using ShareX again because this became too annoying. πŸ˜•

The Snippet Tool toggle is off. ShareX has the same issue with PrintScreen, it might be a Windows 11 related problem. But ShareX supports the remapping so I could work around it easier.

mmahmoudian commented 2 years ago

@krokofant your comment is certainly not constructive and I'm going to hide it.

I personally don't see a point of making something specifically for Windows when it can already be easily done since Win95 or Win98.

This is one solution:

https://www.perkinselearning.org/technology/blog/how-create-custom-keyboard-shortcuts-windows

You can create a desktop shortcut and in Properties define a shortcut as explained in this link. It is easy, fast, straightforward, and native to Windows.

krokofant commented 2 years ago

I personally don't see a point of making something specifically for Windows when it can already be easily done since Win95 or Win98.

This is one solution:

https://www.perkinselearning.org/technology/blog/how-create-custom-keyboard-shortcuts-windows

You can create a desktop shortcut and in Properties define a shortcut as explained in this link. It is easy, fast, straightforward, and native to Windows.

I'm not sure what you imagine this would help with. Since there's no CLI support for Windows adding a keyboard shortcut for flameshot won't do much. If CLI support was there, then I can see the point of creating a keyboard shortcut directly to open flameshot.

mmahmoudian commented 2 years ago

@krokofant that is a fair point. Sorry for jumping to conclusion so quickly. I often forget that the CLI is not there for Windows.

zz940522 commented 2 years ago

I'd love to modify the Shortcut used for a Screencapture on windows (flameshot already running)

Flameshot-Version: 0.8.4 (couldn't find any newer Windows MSI package)

OS: Windows 10 (20H2)

I've been using flameshot on Linux, for a long time, and never found a suitable alternative for use on Windows, so, I was happy to find out there's windows versions available, now (didn't check in a while...) On Linux, I just set up a global shortcut (ctrl+y, in my case) to start flameshot gui, and am quite happy with that. On Windows, I can't (easily?) do that (at least I've not found any documentation for it, and plainly calling flameshot.exe gui does nothing) The Windows Flameshot does come with local Shortcuts, though, while it's running... I'd just love to remap the PrintScreen one to a different shortcut (either in the .conf file or via a UI?) Is this still a thing, and I just missed the documentation for it? Is it maybe already planned for a comming release? Or am I just thinking in the wrong direction and the solution to my problem is something else? (please don't say "just press printscreen" ;) )

Thanks for developing this great tool, there literally is none with as great a UX feeling as flameshot.

Hello, I find a way to set a shortcut for flameshot,please use autohotkeys.

  1. I set Ctrl+Alt+a remap to PrtSc,this will work for you
  2. Please download autohotkeys here https://www.autohotkey.com/
  3. autohotkeys official doc is here https://www.autohotkey.com/docs/commands/Send.htm image
  4. U can add this script to Start up folder image
  5. C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
simetron commented 2 years ago

I'd love to modify the Shortcut used for a Screencapture on windows (flameshot already running) Flameshot-Version: 0.8.4 (couldn't find any newer Windows MSI package) OS: Windows 10 (20H2) I've been using flameshot on Linux, for a long time, and never found a suitable alternative for use on Windows, so, I was happy to find out there's windows versions available, now (didn't check in a while...) On Linux, I just set up a global shortcut (ctrl+y, in my case) to start flameshot gui, and am quite happy with that. On Windows, I can't (easily?) do that (at least I've not found any documentation for it, and plainly calling flameshot.exe gui does nothing) The Windows Flameshot does come with local Shortcuts, though, while it's running... I'd just love to remap the PrintScreen one to a different shortcut (either in the .conf file or via a UI?) Is this still a thing, and I just missed the documentation for it? Is it maybe already planned for a comming release? Or am I just thinking in the wrong direction and the solution to my problem is something else? (please don't say "just press printscreen" ;) ) Thanks for developing this great tool, there literally is none with as great a UX feeling as flameshot.

Hello, I find a way to set a shortcut for flameshot,please use autohotkeys.

1. I set Ctrl+Alt+a remap to PrtSc,this will work for you

2. Please download autohotkeys here
   https://www.autohotkey.com/

3. autohotkeys official doc is here https://www.autohotkey.com/docs/commands/Send.htm
   ![image](https://user-images.githubusercontent.com/33046965/168416997-15949ee1-3422-4d8f-8266-590999d4139b.png)

4. U can add this script to Start up folder
   ![image](https://user-images.githubusercontent.com/33046965/168417187-5ae37485-1ab0-4941-acfe-fe6fe6e4439f.png)

5. C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Thank you for the idea, worked like a charm! A bit messy but this is how looks mine

imagen

sollie commented 2 years ago

Adding my +1 for this feature. I'd prefer not having to install Autohotkey just for this purpose. I'm also using a keyboard that has no physical PrtScr button, which complicates that as a workaround.

T3rminat0r commented 1 year ago

I'm also using a keyboard that has no physical PrtScr button, which complicates that as a workaround.

Not really, the workaround works, even if your PHYSICAL Keyboard does not have said key, autohotkey can still send it, in response to the hotkey you set inside AHK. (it doesn't need to be there, physically, for AHK to send the controlsequence associated with it, to windows. Just think of it as an automated on-screen-keyboard, if that makes sense...

(All that said, I still stick to my initial Feature Request, obviously, all this would be easier, if Flameshot would be able to register a hotkey, based on settings...)

tsong-wallis commented 1 year ago

Adding my +1 for the ability to remap PrtScr. Been a long time user of Greenshot but it doesn't work very well with Win 11. Found a workaround I can live with by using the launcher and increase Delay to a few seconds and click Take new screenshot.

T3rminat0r commented 1 year ago

Just as an update/FTR: I'm currently remapping my wanted shortcut, using the Keyboard Manager from the Microsoft Windows PowerToys suite, which does work, but is a PITA to turn off/on, when needed. (so, just an alternative to AutoHotkeys, from a well known vendor, in case that is something someone else might be looking for, until at somepoint, this hopefully can get implemented :) )

Archie-2021 commented 1 year ago

I was trying to keybind flameshot in Windows using AHK but noticed I can not use command line arguments at all in cmd. Are commandline features are bash only? It is nice that I found out flameshot took automatically printscreen key, but I wonder how would I could keybind it if it was not the case.

mmahmoudian commented 1 year ago

@Archie-2021 At the moment we do not support CLI for Windows. You can follow its progress on #2118

archadallas commented 1 year ago

Finally by doing the second option of this article and disabling the Windows screen app with the registry entry then Flameshot worked immediately. Don't forget to restart the machine after adding the registry DWORD

https://www.makeuseof.com/windows-11-disable-snipping-tool/

NorthernLaw1500 commented 1 year ago

I just wanted to say I agree completely, just started using Flameshot after coming from Lightshot, Flameshot is way more customizable and I'm loving it but 2 things are disappointing me. One being the inability to see the pixel size of the screenshot while taking it, and also what you mentioned. I like having Print Screen be the default and take a full screenshot of my screens. In lightshot, I have numpad + set to take a screenshot, needing to click the Flameshot button in my system tray completely defeats the purpose of using it at all. It definitely can be done as again, Lightshot has a keybind setting you can change to literally anything, so that being said I will keep this installed but will be waiting until I am able to set a custom key to use it.

To reiterate here, Flameshot on Windows doesn't work because of Print Screen doing its thing, my question here is why hasn't there been an option to change the screenshot hotkey to literally anything you want instead of just Print Screen? Lots of others have that option. Should be a thing. I prefer to keep Print Screen anyways as I said before

mmahmoudian commented 1 year ago

@NorthernLaw1500

One being the inability to see the pixel size of the screenshot while taking it

you can:

image

why hasn't there been an option to change the screenshot hotkey to literally anything you want instead of just Print Screen?

Historically, Flameshot was originally designed for Linux, and the paradigm of bindings are very different (imho very much more sane) than Windows. The Windows support was added to Flameshot recently. There are many parts that need to be added to the Windows support including CLI.

Perhaps it worth mentioning that if you really miss any feature and you want to give it development priority, one of the ways is to put some bounty on that issue. some brief description here:

https://flameshot.org/donate/

NorthernLaw1500 commented 1 year ago

@mmahmoudian I went through the options for pixel size and couldn't find it, could you perhaps point me in the right direction?

Interesting, I'd love to see it. Personally I'd rather learn C++ and do it myself but just as an ease of access thing I might end up doing that, I'll look into it for sure. I didn't know Flameshot was that new to Windows, knew it was originally designed for Linux but that's it.

Thank you for your help and knowledge, very much appreciated.

mmahmoudian commented 1 year ago

@NorthernLaw1500

I went through the options for pixel size and couldn't find it, could you perhaps point me in the right direction?

I don't know much about your setup installation method, Flameshot version, ...) therefore very hard for me to help. But here are some facts:

Thank you for your help and knowledge, very much appreciated.

You are most welcome. I'm glad that I was helpful

mercster commented 1 year ago

Hah... so I came here to find, unfortunately, you can't bind naked PrtScn to open Flameshot. Fine, I'm adaptable, I'll just go into the configuration and change the hotkey for opening a screenshot, like Shift-PrtScn. But Flameshot doesn't let you change this under Windows. πŸ˜‚ Any reason why those last few hotkeys at the bottom (you know... the most important ones) can't be rebound? If I could just change opening Flameshot to Shift-PrtScn, everything's gravy. Thanks for the tool.

EDIT: I rebooted and now PrtScn is firing up Flameshot just fine. Who knows!

NorthernLaw1500 commented 1 year ago

@mercster

Any reason why those last few hotkeys at the bottom (you know... the most important ones) can't be rebound?

Well I'll be honest, I have no clue as that is the most important thing you are right, also other screenshot applications such as Lightshot have it. Of course can't expect everything with open source software but that still confuses me. If you read above it was explained a bit but basically just have to deal with it until someone changes it or make a code bounty.

Luckily I found a workaround that works for myself, using my Stream Deck I can set it to one of those keys and while it's not technically a keybind on the keyboard, it works as one. Still wish you could just rebind it normally but maybe it will come one day.

mercster commented 1 year ago

I actually rebooted and... Flameshot is now capturing the PrtScn key just fine. Who knows, Windows is wonky. I should edit my above post.

web-dev-passion commented 1 year ago

I actually rebooted and... Flameshot is now capturing the PrtScn key just fine. Who knows, Windows is wonky. I should edit my above post.

Happened to me as well. πŸ˜„ So it seems that (at least on Windows 11 22H2) you have to deactivate the Snipping Tool in the Windows Settings.

  1. Settings > Ease of Access > Keyboard > Use the PrtScn button to open screen snipping > OFF (or just search for it in the search bar)

  2. (Optional) Make sure Flameshot gets started on boot:

  3. Settings > General > Start automatically > ON

  4. Reboot your system. The PrtScn key should now trigger Flameshot πŸ‘πŸΌ

mmahmoudian commented 1 year ago

@web-dev-passion this is already listed in our troubleshooting documentation for Windows users:

https://flameshot.org/docs/guide/windows-help/#how-to-disable-windows-snipping-tool-when-i-press-printscreen

It seems every now and then after some Windows updates, this setting is reverted without informing user (classic Microsoft move) and users have to apply this setting again.

mjarsky commented 1 year ago

Just chiming in for this too.

I am right-handed, so to use the current PrtScn shortcut, I have to take my hand off the mouse.

I much prefer shortcuts I can invoke with my left hand, e.g., Windows Key + S

P.S. Thank you for creating this tool!

mjarsky commented 1 year ago

Donated!

mmahmoudian commented 11 months ago

Just for the record and connecting issues to PRs, we have a partial implementation in #2168

NyQuilD commented 10 months ago

so I take it there reply is still the same they cant change it so for everyone that needs to have it changed greenshot allows you to map and replace the printscreen key on windows ten and 11 It sucks when I wanted this for 11 but you cant change it and they say they cant change it in windows but greenshot has had that option for years now so I guess this is a dump for me only tried it because of the cool features greenshot does not have but when something works you stick with that program and dont let other catch your eye for false hopes so yeah moving on so hope many people see this

rouninhp commented 9 months ago

Yes! I also think it's necessary for Windows user to config print-screen shortcut

by the way, my PrtSc key didn't remap to flameshot too, so I use it by clicking the logo on the taskbar

Same was happening to me. What seems to have fixed is: 1) Go to Windows Settings > accessibility > keyboard > turn off use the print screen key to open screen capture 2) Restart flameshot. After these simples steps, my PrtSc key started to take screenshots using flameshot and I no longer have to click on logo on the taskbar.

nicl-dev commented 8 months ago

@web-dev-passion this is already listed in our troubleshooting documentation for Windows users:

https://flameshot.org/docs/guide/windows-help/#how-to-disable-windows-snipping-tool-when-i-press-printscreen

It seems every now and then after some Windows updates, this setting is reverted without informing user (classic Microsoft move) and users have to apply this setting again.

This does not work for me on Windows 11 10.0.22635 Build 22635. Even after a restart windows still opens the snipping tool when I'm hitting print for whatever reason. :(

image

8227846265 commented 7 months ago

I tried Flameshot today to test it out and found out you cannot change the bind key for the print shortcut.

Not sure why this is an issue that is not fixed since 2021 when ShareX was able to do this for the past few years.

I can easily edit the key bind in ShareX settings image

Perhaps the Flameshot team can check with ShareX team on how they did it. It might help.

vanjaz commented 7 months ago

Thank you @rouninhp this worked perfectly for me. Note I did previously uninstall snipping tool, but flameshot would still not work until I turned off the toggle you mentioned.

eazyAlf commented 6 months ago

Just for the record and connecting issues to PRs, we have a partial implementation in #2168

@mmahmoudian is alt + print screen implemented? because it doesn't work for me i recently changed my keyboard and dont have a print-screen button anymore. are there native workarounds without autohotkey?

maisonhai3 commented 5 months ago

Yes! I also think it's necessary for Windows user to config print-screen shortcut by the way, my PrtSc key didn't remap to flameshot too, so I use it by clicking the logo on the taskbar

Same was happening to me. What seems to have fixed is:

  1. Go to Windows Settings > accessibility > keyboard > turn off use the print screen key to open screen capture
  2. Restart flameshot. After these simples steps, my PrtSc key started to take screenshots using flameshot and I no longer have to click on logo on the taskbar.

This works like a charm. Windows 11 Home 23H2.