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

Fix copy-paste-cut for Firefox and for any other browser that works the same way #100

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

EmaGht
Copy link

@EmaGht EmaGht commented Apr 17, 2018

see #99

EmaGht added 3 commits April 17, 2018 10:48
When you press CTRL+C, CTRL+V on firefox, for some reason it doesn't send "paste" or "copy" events, but a "keyup" event with "v" or "c" keyCode with a ctrlKey modifier.

With this fix everything gets handled how it should
@@ -112,6 +112,23 @@ export class InputHandler {
return;
}

//Copy/Cut, call the right methods
if(event.charCode == 118 && event.ctrlKey)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could also be command key on mac, maybe you could fix it for mac also? this link might be helpful
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/metaKey

@guillep2k
Copy link

Hi, @EmaGht: there's a fork of this project that has been initiated by user @christopheelkhoury (#121 (comment)). He's offered to work on some of the issues this project has, and has invited everyone with an open issue or pull request to re-issue them on his copy. If you're interested, please check out his repository.

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

Successfully merging this pull request may close these issues.

3 participants