GithubHelp home page GithubHelp logo

Comments (4)

p0deje avatar p0deje commented on August 26, 2024

I'll investigate if this possible, but I have to warn that I'm not sure when exactly I'll be able to do that.

from maccy.

lowercasename avatar lowercasename commented on August 26, 2024

Hi! So after using Maccy for the last month, I kind of love the current functionality. It allows me to have chosen the clipboard text in advance of placing my cursor, which is something I didn't consider would work so conveniently as a workflow for me. So while I'm sure some people would benefit from this feature, I've actually very quickly got used to the way it works now! :)

from maccy.

p0deje avatar p0deje commented on August 26, 2024

I've been trying to figure out the way to properly implement the following functionality:

  1. When you hit Enter - it behaves the same as now (copy + no paste).
  2. When you hit Shift + Enter - it copies and immediately pastes.

However, I haven't found a reliable way to implement this. I've tried to simulate the Cmd+V event but it doesn't always work:

  func paste() {
    let eventDown = CGEvent(keyboardEventSource: nil, virtualKey: UInt16(kVK_ANSI_V), keyDown: true)!
    eventDown.flags = .maskCommand
    eventDown.post(tap: .cghidEventTap)

    let eventUp = CGEvent(keyboardEventSource: nil, virtualKey: UInt16(kVK_ANSI_V), keyDown: false)!
    eventUp.flags = .maskCommand
    eventUp.post(tap: .cgSessionEventTap)
  }

I'm not sure what it might be related to, but since I cannot make it properly work and you mentioned you are fine with the current flow. Let's close this issue for now.

I'll be happy if somebody sends a PR with the Shift+Enter approach that works reliably.

from maccy.

Henrietta1989 avatar Henrietta1989 commented on August 26, 2024

Any news on this? Thanks

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.