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

Copy/Paste/Cut not working on macOS #9

Open
volbil opened this issue Jan 6, 2020 · 5 comments
Open

Copy/Paste/Cut not working on macOS #9

volbil opened this issue Jan 6, 2020 · 5 comments

Comments

@volbil
Copy link

volbil commented Jan 6, 2020

Expected Behavior
When pressing cmd + c/v/x corresponding action is happening.

Actual Behavior
Nothing is happening.

Steps to Reproduce the Problem

  1. Run neutralino-mac executable
  2. Press cmd + c/v/x

Specifications

  • NeutralinoJs Version: v1.3.0
  • Platform: macOS Catalina
@bung87
Copy link

bung87 commented Apr 17, 2020

I can confirm this.

@shalithasuranga shalithasuranga transferred this issue from neutralinojs/neutralinojs Dec 9, 2021
@Marcisbee
Copy link

Any luck with this? I confirm this too.

@benoneal
Copy link

benoneal commented May 3, 2022

Can confirm this is still an issue on macOS with Neutralino v4.4.0.

@javierrojas10
Copy link

Still an issue, there is a way at least to patch it?

@AckerApple
Copy link

AckerApple commented Sep 21, 2022

Here is what I came up with that works really well so far, paste this code into your main.js file:

// monitor keyboard quick keys - (fixes Mac which currently is not respecting quick keys)
window.addEventListener('keydown', (event) => {
  const wasCommandUsed = event.metaKey === true // was command held
  if ( wasCommandUsed ) {
    switch(event.which) {
      case 81: // q
      case 87: // w
        return Neutralino.app.exit()
      case 86: // v
        return document.execCommand('paste')
      case 65: // a - select all
        return document.activeElement.select()
      case 67: // c
        return document.execCommand('copy')
      case 88: // x
        return document.execCommand('cut')
      case 82: // r - refresh
        return location.reload()
    }
  }
})

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

No branches or pull requests

7 participants