Giter Site home page Giter Site logo

Paste right away without copying? about maccy HOT 11 CLOSED

p0deje avatar p0deje commented on September 3, 2024 2
Paste right away without copying?

from maccy.

Comments (11)

p0deje avatar p0deje commented on September 3, 2024 7

The main reason I use the Option key is because it feels more native in my opinion. A bunch of menus in macOS alter its behavior when you press the Option key - some menu items change their name, some new items are added. Because of that, Cocoa has built-in mechanisms for altering menu items and it works really nice and as intuitive as default macOS apps.

I'd like to avoid introducing another global shortcut. However, I can add a configuration option which will turn on/off pasting by default:

defaults write org.p0deje.Maccy pasteByDefault true  # this will paste by default and NOT paste when selected with the Option key pressed
defaults write org.p0deje.Maccy pasteByDefault false # this will NOT paste by default and paste when selected with the Option key pressed

Please react with 👍/👎 if you'd like to have that.

from maccy.

p0deje avatar p0deje commented on September 3, 2024 5

Nevermind. It seems like the performance is slow only during development, but when I build app for release, it is as fast as it should be.

I now have a working solution which I am going to test for some time before making a release.

from maccy.

frank-f avatar frank-f commented on September 3, 2024 1

I thought about this a little more and instead of making this an option, maybe you can just create a second (configurable) hotkey. Cmd-Shift-c put's the selected entry in the clipboard, while Cmd-Shift-v puts it in the clipboard and pastes it right away. Would that be possible?

from maccy.

frank-f avatar frank-f commented on September 3, 2024

I would like an instant-paste feature as well, but I think for me it would be more convenient to have the item in the buffer as well. Maybe this can be done with different (configurable, like the hotkey) key combinations. I'd suggest return / option-return / command-return.

from maccy.

p0deje avatar p0deje commented on September 3, 2024

I attempted to implement it as part of #7 (see my comment) so it could be done using Shift+Enter, but had troubles dealing with macOS accessibility - sometimes the paste worked fine and sometimes it didn't work at all. I might just not know how to do it properly.

I'll be happy to accept PR which implements this feature though.

from maccy.

saeedseyfi avatar saeedseyfi commented on September 3, 2024

@p0deje here you can see how Clipy triggers paste:
https://github.com/Clipy/Clipy/blob/develop/Clipy/Sources/Services/PasteService.swift

from maccy.

p0deje avatar p0deje commented on September 3, 2024

@saeedseyfi Thanks for the link, I managed to implement the paste.

However, the way it is implemented is pretty slow when we have 100+ records in history. The reason for slowness is somewhere deep inside the Cocoa framework and how it calculates menu size, so I'm not sure what to do about that.

@ilearnio @frank-f @saeedseyfi Are you ok reducing the history size from 999 to 99 to have this feature?

from maccy.

ilearnio avatar ilearnio commented on September 3, 2024

Sounds good to me as a user, but still hope that's a temporary solution. It's strange though that a framework is used to calculate the menu size when calling paste

from maccy.

scwood avatar scwood commented on September 3, 2024

Does this feature currently work? Right now it's not doing anything for me

from maccy.

p0deje avatar p0deje commented on September 3, 2024

Not released yet.

from maccy.

p0deje avatar p0deje commented on September 3, 2024

This is now available in 0.4.0.

from maccy.

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.