Add Emacs keybindings to open new/close windows and quit Zed (#22629)

Ross Timson created

These are more closely like default Emacs bindings.

I hope such small and minor changes didn't warrant a discussion in
advance.

Release Notes:

- Added Emacs bindings for creating a new window, closing a window, and
quitting zed entirely.

Change summary

assets/keymaps/linux/emacs.json | 4 +++-
assets/keymaps/macos/emacs.json | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)

Detailed changes

assets/keymaps/linux/emacs.json 🔗

@@ -57,7 +57,9 @@
   {
     "context": "Workspace && !Terminal",
     "bindings": {
-      "ctrl-x ctrl-c": "workspace::CloseWindow", // kill-emacs
+      "ctrl-x ctrl-c": "zed::Quit", // save-buffers-kill-terminal
+      "ctrl-x 5 0": "workspace::CloseWindow", // delete-frame
+      "ctrl-x 5 2": "workspace::NewWindow", // make-frame-command
       "ctrl-x o": "workspace::ActivateNextPane", // other-window
       "ctrl-x k": "pane::CloseActiveItem", // kill-buffer
       "ctrl-x 0": "pane::CloseActiveItem", // delete-window

assets/keymaps/macos/emacs.json 🔗

@@ -57,7 +57,9 @@
   {
     "context": "Workspace && !Terminal",
     "bindings": {
-      "ctrl-x ctrl-c": "workspace::CloseWindow", // kill-emacs
+      "ctrl-x ctrl-c": "zed::Quit", // save-buffers-kill-terminal
+      "ctrl-x 5 0": "workspace::CloseWindow", // delete-frame
+      "ctrl-x 5 2": "workspace::NewWindow", // make-frame-command
       "ctrl-x o": "workspace::ActivateNextPane", // other-window
       "ctrl-x k": "pane::CloseActiveItem", // kill-buffer
       "ctrl-x 0": "pane::CloseActiveItem", // delete-window