forked from webview/webview
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comments
I can confirm this. |
Any luck with this? I confirm this too. |
Can confirm this is still an issue on macOS with Neutralino v4.4.0. |
Still an issue, there is a way at least to patch it? |
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
Expected Behavior
When pressing
cmd + c/v/x
corresponding action is happening.Actual Behavior
Nothing is happening.
Steps to Reproduce the Problem
neutralino-mac
executablecmd + c/v/x
Specifications
The text was updated successfully, but these errors were encountered: