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

CMD + C / CMD + V (clipboard) not working #1902

Closed
AgtLucas opened this issue Jun 8, 2015 · 13 comments
Closed

CMD + C / CMD + V (clipboard) not working #1902

AgtLucas opened this issue Jun 8, 2015 · 13 comments

Comments

@AgtLucas
Copy link

AgtLucas commented Jun 8, 2015

Hello folks,

I'm trying to use that clipboard module to, you know, be able to Copy and Paste stuff into some inputs on my app, but, no joy (Only console.log() the clipboard value works).

I've tried this in both OS X and Windows 7 and already read another issues, such: #916 #1729 #1878

Any ideas?

Thanks!

@steelbrain
Copy link
Contributor

Umm, are you using an keydown event on the document and checking if it's the v and c key and the ctrl key is pressed and then invoking the clipboard module?

@AgtLucas
Copy link
Author

AgtLucas commented Jun 8, 2015

@steelbrain Nops. There's another way to use that?

@AgtLucas
Copy link
Author

AgtLucas commented Jun 8, 2015

Just an update. It's working on Windows 8.

@zcbenz
Copy link
Member

zcbenz commented Jun 9, 2015

I tried with clipboard.writeText('text'), it seems to write "text" to clipboard successfully?

@yoshuawuyts
Copy link
Contributor

You might want to implement a menu as shown in - moose-team/friends#123 (comment). Writing manual code for this can be somewhat of a pain.

@bengotow
Copy link
Contributor

Yep, fwiw I put this example together a few days ago that creates the standard application menus and enables copy/paste: https://github.com/bengotow/electron-sample-apps/tree/master/menus

@zcbenz
Copy link
Member

zcbenz commented Jun 12, 2015

Closing since it doesn't seem to be a bug.

@zcbenz zcbenz closed this as completed Jun 12, 2015
@thardes2
Copy link

thardes2 commented Jun 28, 2017

Why is this not a bug? This is not really a common way to solve such behaviour

@dskvr
Copy link

dskvr commented Jan 13, 2018

Definitely a bug.

@RALMAZ
Copy link

RALMAZ commented May 16, 2018

Why ignore this?

1 similar comment
@zlab
Copy link

zlab commented Aug 6, 2018

Why ignore this?

@saikksub
Copy link

I am trying to read image from electron clipboard. Anyone have working solution for this?

@Beace
Copy link

Beace commented Nov 16, 2018

Yep, fwiw I put this example together a few days ago that creates the standard application menus and enables copy/paste: https://github.com/bengotow/electron-sample-apps/tree/master/menus

I agree with you. You cannot disable the menu edit but I do't know why.

const subMenuEdit = {
      label: 'Edit',
      submenu: [
        { label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' },
        { label: 'Redo', accelerator: 'Shift+Command+Z', selector: 'redo:' },
        { type: 'separator' },
        { label: 'Cut', accelerator: 'Command+X', selector: 'cut:' },
        { label: 'Copy', accelerator: 'Command+C', selector: 'copy:' },
        { label: 'Paste', accelerator: 'Command+V', selector: 'paste:' },
        {
          label: 'Select All',
          accelerator: 'Command+A',
          selector: 'selectAll:'
        }
      ]
    };

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