Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change the capture screen shortcut on MacOS #1259

Closed
mkrou opened this issue Jan 26, 2021 · 43 comments
Closed

Can't change the capture screen shortcut on MacOS #1259

mkrou opened this issue Jan 26, 2021 · 43 comments
Labels
MacOS MacOS related

Comments

@mkrou
Copy link

mkrou commented Jan 26, 2021

Flameshot version
265e42c

System Information
macOS Big Sur 11.1

Problem
It's impossible to change the capture screen shortcut in the gui configuration.

image

How can I change the shortcut? cmd+shift+alt+4 is super hard to use

@borgmanJeremy
Copy link
Contributor

@ThePurple any ideas on this?

@holazt holazt added the MacOS MacOS related label Jan 26, 2021
@DirkSchneemann-TomTom
Copy link

Same thing in MacOS Catalina 10.15.7, if that is of any help in debugging.

@panpuchkov
Copy link
Contributor

Sorry for a long response, I missed this ticket.
It's not an issue, it's a feature request.
Currently it's hard-coded and is not configurable.
Will add this feature it later.

@mkrou
Copy link
Author

mkrou commented Feb 15, 2021

@ThePurple could you please show where is it hardcoded? I can't find it.

@panpuchkov
Copy link
Contributor

@mkrou

// set global shortcuts for MacOS

@borgmanJeremy
Copy link
Contributor

Similar request for windows #1341

@isheraz
Copy link

isheraz commented Mar 26, 2021

Will there be an update soon?

@jaredyam
Copy link

The current shortcut for taking screenshots (⌘ + ⌥ + shift + 4) is really hard to use. Maybe the default shortcut used in the Xnip (⌘ + shift + X) will be a better solution.

@isheraz
Copy link

isheraz commented Mar 29, 2021

The current shortcut for taking screenshots (⌘ + ⌥ + shift + 4) is really hard to use. Maybe the default shortcut used in the Xnip (⌘ + shift + X) will be a better solution.

Yes a smaller one would be nicer

@danielgroen
Copy link

⌘ + shift + 4

@mmahmoudian
Copy link
Member

@isheraz there will be an update soon, but I'm not sure if this issue is addressed in it. Perhaps @ThePurple can comment as he knows better that me what is the current state.

@wittd19
Copy link

wittd19 commented May 21, 2021

FYI - On Mac, I was able to map the PrintScreen button using my logitech keyboard software to the default key-mapping.

@Enstrayed
Copy link

Enstrayed commented Jun 13, 2021

Bumping this issue cause its been like a month since this has last had any activity and this issue is still not fixed. If it's coming as a feature, why can't you just unlock it now? Was this fixed in a newer version and mine is just out of date or?

@borgmanJeremy
Copy link
Contributor

We can't unlock it now because the work is not done. We have busy lives and work on this for free as our time allows.

If you want it done now, do it yourself and submit a PR. If you want guidance on implementing it hit us up on the slack.

@mmahmoudian
Copy link
Member

mmahmoudian commented Jun 13, 2021

@ctaetcsh Flameshot is an OpenSource software and like most FLOSS softwares out there, it is done by volunteer work. I hope you understand why development is not as rapid as proprietary software.

Now back to your question, the latest state of the project can be easily compiled from source. You can find proper instructions here:

https://flameshot.org/guide/installation/compilation/#osx

Just remember that the resulting software should not be considered as "stable" and you might face issues here and there (rarely), but the benefit is that you will get the latest features.

@Enstrayed
Copy link

@mmahmoudian I understand that this is done via volunteer work and that progress is slower then with software that has people paid to work on it. The attitude of my original comment is mostly because it seems like a weird thing to take a long time to fix. Why are those last 5 shortcuts hard coded? Is it a bodge from an other issue or just an oversight?

I have already started to see if I could just fix it for myself by changing the hard coded default to something that would work for me, and I appreciate you giving me pointers on where to begin since I've never dabbled with C++ stuff before.

@Enstrayed
Copy link

Okay I was able to change the hard coded default to F13 and it's working great!
Looking at configshortcuts.cpp, line 89 to 91 includes the following comment:

    // TODO - Linux doesn't support global shortcuts for (XServer and Wayland),
    // possibly it will be solved in the QHotKey library later. So it is
    // disabled for now.

I assume it was just disabled across everything until the issue could be looked into further. If that was so, couldn't a temporary solution be to just disable it based on the OS?

@mmahmoudian
Copy link
Member

@ctaetcsh I'm not sure if I understood your point, but the code already tries to handle different operating systems differently:
Screenshot of the code with annotations

And in Linux, as far as I know, there is truly no possibility of defining global shortcuts because the shortcuts are managed by the window manager (much much more customisable compared to MacOS or Windows). Flameshot was initially designed for Linux and we recent started supporting Windows and Mac.

@Enstrayed
Copy link

If it can change based on OS, why is it disabled (i'm making an assumption here) on any OS and not just Linux where this issue exists? If that is the solution, that doesn't seem like a particularly difficult thing to implement and thus cross off a 5 month old issue.

@mmahmoudian
Copy link
Member

mmahmoudian commented Jun 14, 2021

This discussion is definitely off-topic, but FYI, in Linux the shortcuts for starting software are not handled by the software itself but rather the window manager (which is something that can easily changed and customized in Linux but it is impossible to change or modify freely in Windows and OSX). Additionally, Flameshot uses QT library to communicate with the window manager, and because there are many window managers in Linux, as far as I know, there is no unified way to implement global shortcuts and therefore QT doesn't have a ready-made functionality to set it.

Believe it or not, we have never received any of such issues from Linux users and everything works perfectly. All such filed issues come from users with limited and restricted operating systems (i.e Windows and MacOS).

Regardless, as you saw, this is relatively an easy thing to change and compile.

@kossa
Copy link

kossa commented Aug 3, 2021

@ThePurple any update about this, I found this cool tool on mac, everything well except for the shortcut, really it should be customizable, it's the most important, you can hard other shortcut 😁

@panpuchkov
Copy link
Contributor

@kossa no updates yet, sorry. I'll try to find some time for this, but without ETA for now :)

@kossa
Copy link

kossa commented Aug 3, 2021 via email

@Enstrayed
Copy link

@kossa Meant to reply to this earlier, but as I showed above it's easy to change the binding and recompile it with that new hard coded binding. This is what I have been doing and it has worked flawlessly.

@kossa
Copy link

kossa commented Aug 5, 2021

Thank you @ctaetcsh I dont have GCC environment and dont want to install it, all screenshot apps offer the possibility to customize the shortcut, and Flameshot is a great one I used so it should have this feature 👍

@OrkunTokdemir
Copy link
Contributor

it will make it configurable.

@Markkop
Copy link

Markkop commented Aug 23, 2021

Hey, there! What if it's possible to trigger the capture action by biding a shortcut in this Keyboard Config?
image

@kossa
Copy link

kossa commented Aug 23, 2021

It does not work for me

@troy-lamerton
Copy link

This GitHub issue has many participants so please keep off-topic discussions to a minimum.

The collaborators have already pointed out where to change the hard-coded value.

I would propose this:

This one-liner change would improve the experience a lot for us Mac users. No need to check it compiles if you only change the string.

If I had time I would make a PR myself. Later we could consider an option to change the keyboard shortcut.

@Enstrayed
Copy link

Enstrayed commented Aug 24, 2021

Seeing these updates, it's hard not to get somewhat frustrated because as far as I can tell this is what we've learned:

  • The key combination can be set to basically anything and have it work fine
  • The code and UI work to change key shortcuts is there

I can't be the only one who feels like the solution here is fairly straight forward. Telling people to "go do the work and open a PR" isn't helpful, not everyone is an expert in C and Qt. More than that, there hasn't been a clear explanation as to why these specific shortcuts are disabled.

Now, given that all of what I just is considered "off-topic", I ask for one of two things:

  • An explanation (at your leisure) as to why things are this way
    or
  • A commitment to have somebody look into this and fix the issue.

Again, this is a request, NOT a demand. I understand that we are not entitled to either, but the request to fix this issue is made with (what I hope) are good intentions in wanting to help improve this software. We are not your enemy; we have an interest in this software becoming better too.

I appreciate your time. Thank you.

@borgmanJeremy
Copy link
Contributor

There's no contention on changing this to be configurable. I don't have easy access to a Mac to do testing on so I am prioritizing other issues with my limited free time.

@b0nete
Copy link

b0nete commented Sep 28, 2021

Please!, we need this :)

@truefan4ever
Copy link

It would be cool to change shortcut, waiting for this feature.

@m-stojanovic
Copy link

looking forward to this feature...

@panpuchkov
Copy link
Contributor

I don't have easy access to a Mac too, so I cannot implement it.
Sorry, but you have to wait.

@zeroXserdar

This comment has been minimized.

@deseven
Copy link

deseven commented Nov 10, 2021

For those who use Karabiner-Elements, here's the config to map ⇧⌘T to ⇧⌘⌥4 (you can change ⇧⌘T to anything you want):

{
  "title": "Flameshot global hotkey workaround",
  "rules": [
    {
      "description": "Map ⇧⌘T to ⇧⌘⌥4",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "t",
            "modifiers": {
              "mandatory": [
                "left_shift",
                "left_command"
              ]
            }
          },
          "to": [
            {
              "key_code": "4",
              "modifiers": [
                "left_command",
                "left_shift",
                "left_option"
              ]
            }
          ]
        }
      ]
    }
  ]
}

Put it in ~/.config/karabiner/assets/complex_modifications/flameshot.json and enable in the "Complex modifications" tab of Karabiner-Elements Preferences.

LHBosssss pushed a commit to LHBosssss/flameshot that referenced this issue Nov 20, 2021
From issue flameshot-org#1259 and my experience, I've fix and test this feature in my Hackintosh. So now you can change shortcut to take screenshot and show screenshot history (require restart flameshot).
- Default key to take screenshot is "Cmd + Shift + X", screenshot history is "Option + Shift + X".
- Added new translate text "Require restart flameshot".
borgmanJeremy pushed a commit that referenced this issue Nov 21, 2021
)

* Enable Screenshot & Screenshot history shortcut changing in MACOS
From issue #1259 and my experience, I've fix and test this feature in my Hackintosh. So now you can change shortcut to take screenshot and show screenshot history (require restart flameshot).
- Default key to take screenshot is "Cmd + Shift + X", screenshot history is "Option + Shift + X".
- Added new translate text "Require restart flameshot".

* - Change message text for screenshot shortcut

* - Format code using clang-format

Co-authored-by: adrienpixodeo <[email protected]>
@borgmanJeremy
Copy link
Contributor

This is fixed on the master branch now and will be part of version 11.

@up-to-you
Copy link

It would be nice to install v11 this year !

Do i have a chance to ask about approximate release date ?

P.s. Definitely would be a contributor if it was written in Rust (no experience with segfault-free C++ 😁 )

@borgmanJeremy
Copy link
Contributor

I'm a fellow rust enthusiast 😁 if the FFI between rust and c++ was a little cleaner I would consider writing the new upload feature in rust

I was planning to release the beta last weekend but some personal issues came up. Hopefully this week/weekend I can get it out. We already feature froze so only merging bug fixes until the release is out.

@up-to-you
Copy link

https://github.com/google/autocxx is an insane tool as a C++/Rust glue.

P.s. just to increase chance for Rust integration one more percent 😁

@EhsanQA62
Copy link

Keyboard > Keyboard Shortcuts > App Shortcuts
Uploading image.png…

@Enstrayed
Copy link

Enstrayed commented May 2, 2024

Comment I replied to was deleted, original text:

Congratz on having this feature on Mac.
Maybe the time has come to have this on Windows, too? Or maybe someone knows any workaround?
It would be highly appreciated.

@robertasDS This issue is long since resolved, if you're encountering a similar issue on Windows you'll likely need to find/open a new issue for Windows specifically. However, if you are on Windows, you may consider other software with similar functionality to Flameshot where keybind remapping is thoroughly supported:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS MacOS related
Projects
None yet
Development

No branches or pull requests