Replies: 2 comments 1 reply
-
Off topic but i'm interesting in that part
How does your browser app not have menu items? I thought browsers themselves set them the same way tauri does (or similar enough). |
Beta Was this translation helpful? Give feedback.
-
tldr, my original request:
alternatively, if anyone wants to help, can you point me towards the code in Tauri that handles this system menu copy paste behavior? maybe I can look into it myself. Thanks all! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
for reference, I develop on a Mac, I intend to build to Mac/Windows/Linux.
This question follows me having read about the requirement for Copy Paste system menu items to enable the behavior in app.
In summary, I think what I'm looking for is the ability to intercept the system level copy/paste behavior to allow or disallow it based on my own criteria. Is there a way to replace this:
with
Alternatively, is there a way to enable system level Copy/Paste without adding those menu items?
Specifically,
I have an app that is basically a graphic design tool (Adobe Illustrator etc...). I have
<input type="text">
and<textarea>
scattered throughout, so, I really need that sytem level copy/paste behavior, I think it would be too difficult to re-implement this from scratch. But also, I have a graphical canvas with shapes, selection, and the ability for the user to copy/paste shapes.As a browser app (no menu items, only keyboard), my app works fine. I use a keyboard handler to check which element is active (form type or canvas), and proceed accordingly. (preventDefault or not)
As a Tauri app with a menu with native_items Copy/Paste, the same keyboard handler continues to work fine. Except, obviously, trying to copy/paste the canvas shapes by using the System Menu items (not using keyboard shortcuts). Hence, my situation:
Thanks for reading through my problem.
Beta Was this translation helpful? Give feedback.
All reactions