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

ctrl + w? #5

Open
misterhat opened this issue May 21, 2019 · 4 comments
Open

ctrl + w? #5

misterhat opened this issue May 21, 2019 · 4 comments

Comments

@misterhat
Copy link

how do I enter custom key codes such as ctrl + w which closes the tab by default? there are no browser addons to disable that functionality.

@coderaiser
Copy link
Member

How do you use gritty? Do you install it globally? What does ctrl + w in terminal?

@coderaiser
Copy link
Member

Looks like this is related to coderaiser/cloudcmd#215 and this is new contributors friendly issue :).

@misterhat
Copy link
Author

misterhat commented May 21, 2019

I'm using ctrl + w in vim to switch between buffer views, and in bash to delete the last word under my cursor. I don't think you can prevent ctrl + w from closing the tab, even with preventDefault (discussed in that issue). I believe there are some options in xtermjs to change the meta key to something else (so maybe I could use windows_key+w instead?).

There was a similar discussion I found here: xtermjs/xterm.js#487 (comment)

This is pretty much the only thing preventing me from theoretically using this as a driver tbh. Perhaps if xterm does support key re-mapping, you could make it a config on gritty's end?

EDIT: and to add, ctrl + t will present a similar issue in that it opens a tab, but some programs expect to receive it as an input.

@coderaiser
Copy link
Member

Yes, you are right, preventDefault didn't work for this case.

This is pretty much the only thing preventing me from theoretically using this as a driver tbh. > Perhaps if xterm does support key re-mapping, you could make it a config on gritty's end?

Yes, when xterm does support, adding such an option on gritty wouldn't be a problem.

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