Report operating system name, to enable native default key bindings
Is your feature request related to a problem? Please describe.
Native apps running on macOS have different default key bindings than the ones running on other OSs. I'd like to do the same in terminal apps.
Describe the solution you'd like
Kitty already has the kitty-query-os_name XTGETTCAP request,
but I'd like to have a terminal-agnostic one (query-os-name or query-system-name) that returns
query-os-name=uname=$(uname)if WezTerm is running on Unix-like systemsquery-os-name=Windowsif on Windows- likewise for any other/future OSs (use
unameif possible, else we can come up with a name)
I'd also be fine with dropping uname= prefix; I thought it helps to make the behavior extremely obvious.
Describe alternatives you've considered I guess we could advertise a "keybinding flavor" instead though that's probably too vague.
Additional context
- https://github.com/kovidgoyal/kitty/issues/9217
- https://codeberg.org/dnkl/foot/pulls/2217/
cc authors of terminals relevant to my use case (detecting whether the client OS is macOS or not) @christianparpart @gnachman @mitchellh (I wasn't sure if everyone is on https://gitlab.freedesktop.org/terminal-wg/)
cc @rockorager who is a maintainer on Ghostty who represents the bulk of VT specifications.
I think this is a good idea in general. I do think dropping uname would be better and the spec for this just says it's the output of uname on Unix-likes, otherwise some other platform specific name ("Windows").
Ok, dropping uname= sounds fine to me, since I don't have a use case where I'd need to know whether the system is an arbitrary Unix. Both Python and NodeJS use win32 for Windows but I'm fine with either.