Ttyd – Share your terminal over the web
github.com
github.com
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.
I got curious and I wondered if a similar thing could be done using pexpect.
I went ahead and asked claude to create an MVP. Works pretty well for 20 mins worth of work. Pexpect is a great tool imo.
If anyone is curious: https://github.com/rusiaaman/pexpect-web
There actually is a tmux fork, tmate, that shares over the Internet (not web/HTTP).
Anyway, this looks great. They mention OpenWrt, and that's exactly what I'd use it for.