cloudcmd/gritty

ctrl + w?

Opened this issue · 5 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.

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

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

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.

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.

Install Brave Browser, enter brave://settings/system/shortcuts , and here you have all the shortcuts, including closing tabs, with ctrl + w, and ctrl +f4, here you cand delete that shortcuts, and after that, you can use ctrl+w to search on pico/nano