3 ms·
> pressing CTRL-W will definitely generate a "wtf" moment a few times FYI, a fix for that is coming soon: https://w3c.github.io/keyboard-lock/ https://w3c.gith
by Ajedi32 9y ago
> pressing CTRL-W will definitely generate a "wtf" moment a few times
FYI, a fix for that is coming soon: https://w3c.github.io/keyboard-lock/ https://w3c.github.io/keyboard-lock/
- LeifCarrotson 9y agoYou can hack around this by grabbing the "window.onbeforeunload" event to display the "Changes you have made to this page may not be saved: Leave/Stay" dialog when closing a tab. Reddit implements this when you're writing a comment, HN does not. The nice thing about a remote desktop, though, is that you won't actually lose changes.
- riskable 9y agoThe problem with this proposal is that it only works with full-screen applications. Want to have multiple tabs open to many different desktops? Forget it. Ctrl-w will screw you. Browsers already have an API for overriding built-in keyboard shortcuts: Event.preventDefault(). It's just that browser makers have chosen to ignore it for certain special keys like Ctrl-t and Ctrl-w.