top | item 43454970

(no title)

brw | 11 months ago

One issue I always run into with browser-based terminal emulators or remote desktop clients is that common keyboard shortcuts like Ctrl-W might be used by the browser instead. Accidentally closing your browser tab and thus losing all your state when you just wanted to remove the previous word is quite annoying. It could be nice if a web app was able "capture" the keyboard somehow so that the browser doesn't react to any of its normal shortcuts, which is also commonly done in VM software and remote desktop apps, or I guess similar to input mode in Vim.

An open issue here[1] mentions that PWAs can actually define shortcuts that override browser ones which could be a solution. And someone also mentions using extensions that redefine the Ctrl-W shortcut as a workaround. But afaik both of these solutions rely on defining keyboard shortcuts beforehand which doesn't seem easy to do, given that you'd have to somehow define all of the shortcuts possibly used by your shell, editor, or any other terminal apps.

[1] https://github.com/tsl0922/ttyd/issues/1181

discuss

order

No comments yet.