Code Monkey home page Code Monkey logo

Comments (6)

sdassow avatar sdassow commented on August 24, 2024

Just checked and it does work correctly on macOS.

from fyne.

dweymouth avatar dweymouth commented on August 24, 2024

Probably because the builtin select-all shortcut on Mac is Super+A instead of Ctrl+A, but it does look like there may be a bug since you have no Entry widget or anything else in the snippet that would be using the builtin select all shortcut

from fyne.

andydotxyz avatar andydotxyz commented on August 24, 2024

Hmm, I wonder if there is a bug here where we conflict internally because that is a defined keyboard shortcut.
Can you register the SelectAllShortcut when not on Darwin and see if that works?

from fyne.

sdassow avatar sdassow commented on August 24, 2024

I've been trying to find a way to register only that without success. And I think the corresponding code always ignores custom shortcuts in favor of the predefined ones: https://github.com/fyne-io/fyne/blob/master/internal/driver/glfw/window.go#L867
If this the expected behavior, adding a sentence about it in the documentation would at least prevent surprises.
With that in mind it seems the only safe solution would be to switch to Alt instead of Control as a modifier key. Which would have the added benefit of being consistent with input fields.

from fyne.

dweymouth avatar dweymouth commented on August 24, 2024

I'm pretty sure that's a bug and not intended behavior. Some reworking of the shortcut handling here is needed I think.

IMO developers should be able to override the builtin shortcuts, but the builtin widgets should still receive them if focused. (EG you can register Ctrl+A on the window canvas, but if an Entry widget is focused it should still receive the builtin select all shortcut, unless it itself is overridden to register a different handler for that keybinding.

from fyne.

andydotxyz avatar andydotxyz commented on August 24, 2024

Agreed

from fyne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.