gritty icon indicating copy to clipboard operation
gritty copied to clipboard

ctrl + w?

Open misterhat opened this issue 5 years ago • 4 comments

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.

misterhat avatar May 21 '19 16:05 misterhat

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

coderaiser avatar May 21 '19 16:05 coderaiser

Looks like this is related to https://github.com/coderaiser/cloudcmd/issues/215 and this is new contributors friendly issue :).

coderaiser avatar May 21 '19 16:05 coderaiser

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: https://github.com/xtermjs/xterm.js/issues/487#issuecomment-273887525

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.

misterhat avatar May 21 '19 17:05 misterhat

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.

coderaiser avatar May 21 '19 17:05 coderaiser