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

Reassign or at least disable ctrl-w combination #993

Closed
david-shiko opened this issue Aug 7, 2022 · 4 comments
Closed

Reassign or at least disable ctrl-w combination #993

david-shiko opened this issue Aug 7, 2022 · 4 comments

Comments

@david-shiko
Copy link

"ctrl-w" combination is "remove last word" combination on *nix systems and most git consoles.
But in browsers this is combination to close current tab ://

Well which one combination we should choose for users?
IMO by imitating/pretending git service and git console - we should imitate git shortcuts as well.
So the best way - is to reassign ctrl-w combination to git behavior, the temporary solution is just disable this combination.

I just closed about 10 times my level tab just because tried erase the last word :)
It's really annoying. BTW in most web consoles that I met "ctrl-w" combination conforms with *nix rather than browser behavior.

@pcottle
Copy link
Owner

pcottle commented Aug 7, 2022

Yeah I'm totally supportive of this -- sadly it looks like it's not quite possible though. The most we could do is hook into the beforeunload event (which helps catch accidental closes):
https://stackoverflow.com/questions/21695682/is-it-possible-to-catch-ctrlw-shortcut-and-prevent-tab-closing

thoughts?

@david-shiko
Copy link
Author

I'm not a web developer but IMO the specified solution looks adoptable for this case.

@pcottle
Copy link
Owner

pcottle commented Aug 8, 2022

Ok I'll try that -- fwiw I made it so it only warns if you're in the middle of solving a level and not just all the time.

@pcottle
Copy link
Owner

pcottle commented Aug 8, 2022

(so its not overly annoying)

@pcottle pcottle closed this as completed in be58bef Aug 8, 2022
pcottle added a commit that referenced this issue Aug 8, 2022
Resolves #993 -- warn on before unloading
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

2 participants