Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default pane::SplitRight keybinding broken with AZERTY keyboard #18076

Closed
1 task done
juliangarnier opened this issue Sep 19, 2024 · 1 comment
Closed
1 task done

Default pane::SplitRight keybinding broken with AZERTY keyboard #18076

juliangarnier opened this issue Sep 19, 2024 · 1 comment
Labels
duplicate Additional reports of an existing issue keybinds Keyboard shortcuts, mapping, binding, keymaps, etc macOS Platform-specific feedback for macOS behaviors, features, design, etc

Comments

@juliangarnier
Copy link

juliangarnier commented Sep 19, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

The default key binding for "pane::SplitRight" in the "View" menu is (incorrectly?) listed as "cmd-`".

Screenshot 2024-09-19 at 16 54 19

The default json list the Atom default key bindings for this action is:

  // Bindings from Atom
  {
    "context": "Pane",
    "bindings": {
      "cmd-k up": "pane::SplitUp",
      "cmd-k down": "pane::SplitDown",
      "cmd-k left": "pane::SplitLeft",
      "cmd-k right": "pane::SplitRight"
    }
  },

And my theory why the View menu shows a different key bind only for Split Right is that the VSCode binding for Split Right is:

// Bindings from VSCode
"cmd-\\": "pane::SplitRight",`

and the key "\" on a QWERTY keyboard is located where the "`" key is on an AZERTY keyboard:

Screenshot 2024-09-19 at 16 46 22
Screenshot 2024-09-19 at 16 46 17

The even weirder thing is that I choose "Sublime Text" as my default layout...

It's very confusing.

Typing "cmd-`" on my keyboard result in splitting the pane to the right AND writing one "`" character.

I tried overriding the key bind like this:

Screenshot 2024-09-19 at 16 10 00

But this has no effect, the keybind is still active and also write a singe "`"

Might be related to #4624, #5195 and #5196.

Could this be resolved by #17031?

Environment

Zed: v0.152.4 (Zed)
OS: macOS 14.6.1
Memory: 32 GiB
Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
2024-09-19T15:39:44.586264+02:00 [INFO] ========== starting zed ==========
2024-09-19T15:39:44.59188+02:00 [INFO] Opening main db
2024-09-19T15:39:44.646904+02:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2024-09-19T15:39:44.671054+02:00 [INFO] set environment variables from shell:/bin/bash, path:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/X11/bin:/Applications/Topaz Gigapixel AI.app/Contents/Resources/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin://Applications/Topaz Gigapixel AI.app/Contents/Resources/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
2024-09-19T15:39:44.953216+02:00 [INFO] initializing context server client
2024-09-19T15:39:44.954582+02:00 [INFO] Registering built-in prompt template: content_prompt
2024-09-19T15:39:44.957281+02:00 [INFO] Registering built-in prompt template: edit_workflow
2024-09-19T15:39:44.957661+02:00 [INFO] Registering built-in prompt template: step_resolution
2024-09-19T15:39:44.958191+02:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-09-19T15:39:44.959018+02:00 [INFO] No prompt template overrides directory found at /Users/juliangarnier/.config/zed/prompt_overrides. Using built-in prompts.
2024-09-19T15:39:45.07735+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.077766+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.077996+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.078237+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.08125+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.081431+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.081967+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.082242+02:00 [INFO] Opening main db
2024-09-19T15:39:45.082415+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.082634+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.098862+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.17523+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.177144+02:00 [INFO] Opening main db
2024-09-19T15:39:45.180403+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.247476+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.247818+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.257654+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.265205+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.26639+02:00 [ERROR] no worktrees when constructing ProjectLspAdapterDelegate
2024-09-19T15:39:45.300988+02:00 [INFO] rebuilt extension index in 1.553445ms
2024-09-19T15:39:45.307461+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:45.325397+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:39:46.227492+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:39:55.65723+02:00 [INFO] starting language server. binary path: "/Users/juliangarnier/Library/Application Support/Zed/node/node-v22.5.1-darwin-x64/bin/node", working directory: "/", args: ["/Users/juliangarnier/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-09-19T15:39:58.643916+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-09-19T13:39:58.635Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-09-19T13:39:58.635Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-09-19T15:39:58.647471+02:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "2e608652-be3d-4f3d-8f28-de9d66c4b0d4",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-09-19T15:39:59.174455+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-09-19T13:39:59.166Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-09-19T13:39:59.166Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-09-19T15:42:41.315817+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:42:42.821708+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:42:48.282492+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:42:48.291199+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:42:58.503405+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:42:58.508126+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:43:18.907477+02:00 [INFO] open paths ["/Users/juliangarnier/.config/zed/keymap.json"]
2024-09-19T15:43:18.934037+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-19T15:43:18.934387+02:00 [INFO] starting language server "json-language-server", path: "/Users/juliangarnier/.config/zed/keymap.json", id: 1
2024-09-19T15:43:18.935107+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:43:18.935305+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-19T15:43:18.936032+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:43:20.125747+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:43:20.136038+02:00 [INFO] Opening main db
2024-09-19T15:43:20.139396+02:00 [INFO] fetching latest version of language server "json-language-server"
2024-09-19T15:43:20.139631+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:20.330944+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:20.519818+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:20.714892+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:21.274716+02:00 [INFO] downloading language server "json-language-server"
2024-09-19T15:43:21.275024+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:21.456923+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:21.531115+02:00 [INFO] Installing default prettier and plugins: [("prettier", "3.3.3")]
2024-09-19T15:43:21.641173+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:21.850592+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:23.277681+02:00 [INFO] Initialized prettier with plugins: {}
2024-09-19T15:43:25.881886+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:43:26.100665+02:00 [INFO] starting language server. binary path: "/Users/juliangarnier/Library/Application Support/Zed/node/node-v22.5.1-darwin-x64/bin/node", working directory: "/Users/juliangarnier/.config/zed", args: ["/Users/juliangarnier/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-09-19T15:45:07.723823+02:00 [ERROR] failed to canonicalize root path: No such file or directory (os error 2)
2024-09-19T15:45:08.336594+02:00 [ERROR] failed to canonicalize root path: No such file or directory (os error 2)
2024-09-19T15:45:10.626235+02:00 [ERROR] oneshot canceled
2024-09-19T15:45:14.051856+02:00 [INFO] ========== starting zed ==========
2024-09-19T15:45:14.053143+02:00 [INFO] Opening main db
2024-09-19T15:45:14.097774+02:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2024-09-19T15:45:14.112245+02:00 [INFO] set environment variables from shell:/bin/bash, path:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/X11/bin:/Applications/Topaz Gigapixel AI.app/Contents/Resources/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin://Applications/Topaz Gigapixel AI.app/Contents/Resources/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
2024-09-19T15:45:14.365369+02:00 [INFO] initializing context server client
2024-09-19T15:45:14.365732+02:00 [INFO] Registering built-in prompt template: content_prompt
2024-09-19T15:45:14.366502+02:00 [INFO] Registering built-in prompt template: edit_workflow
2024-09-19T15:45:14.36704+02:00 [INFO] Registering built-in prompt template: step_resolution
2024-09-19T15:45:14.36791+02:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-09-19T15:45:14.36841+02:00 [INFO] No prompt template overrides directory found at /Users/juliangarnier/.config/zed/prompt_overrides. Using built-in prompts.
2024-09-19T15:45:14.449506+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.449825+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.450158+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.450508+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.452004+02:00 [INFO] Opening main db
2024-09-19T15:45:14.45227+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.452608+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.452919+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.453126+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.453503+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.455589+02:00 [INFO] installing extension html latest version
2024-09-19T15:45:14.455895+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.502564+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.503226+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.503804+02:00 [INFO] Opening main db
2024-09-19T15:45:14.589257+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:45:14.592491+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.592765+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.595991+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.598031+02:00 [ERROR] no worktrees when constructing ProjectLspAdapterDelegate
2024-09-19T15:45:14.605438+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:45:14.607244+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.615663+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:45:14.617421+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.641136+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:45:14.642644+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:14.800069+02:00 [INFO] Opening main db
2024-09-19T15:45:14.860892+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:45:15.090386+02:00 [INFO] starting language server. binary path: "/Users/juliangarnier/Library/Application Support/Zed/node/node-v22.5.1-darwin-x64/bin/node", working directory: "/", args: ["/Users/juliangarnier/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-09-19T15:45:15.627231+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-09-19T13:45:15.620Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-09-19T13:45:15.620Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-09-19T15:45:15.629513+02:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "0457f269-7626-43f8-a7ef-8abf6dd52501",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-09-19T15:45:15.72853+02:00 [INFO] rebuilt extension index in 7.312819ms
2024-09-19T15:45:15.72877+02:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0
2024-09-19T15:45:16.016945+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:45:16.018685+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:16.093326+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-09-19T13:45:16.088Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-09-19T13:45:16.088Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-09-19T15:45:36.961754+02:00 [INFO] open paths ["/Users/juliangarnier/.config/zed/keymap.json"]
2024-09-19T15:45:36.98083+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-19T15:45:36.981095+02:00 [INFO] starting language server "json-language-server", path: "/Users/juliangarnier/.config/zed/keymap.json", id: 1
2024-09-19T15:45:36.981717+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:45:36.981927+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-19T15:45:36.982572+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:45:36.994005+02:00 [INFO] fetching latest version of language server "json-language-server"
2024-09-19T15:45:36.99432+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:45:38.342829+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:45:38.353765+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:45:39.252052+02:00 [INFO] downloading language server "json-language-server"
2024-09-19T15:45:39.252742+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:45:39.453033+02:00 [INFO] starting language server. binary path: "/Users/juliangarnier/Library/Application Support/Zed/node/node-v22.5.1-darwin-x64/bin/node", working directory: "/Users/juliangarnier/.config/zed", args: ["/Users/juliangarnier/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-09-19T15:46:06.832644+02:00 [INFO] Initializing default prettier with plugins {}
2024-09-19T15:46:06.83303+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-19T15:46:06.852761+02:00 [WARN] request completed with error: failed to connect to the server
2024-09-19T15:47:03.555117+02:00 [INFO] Waiting for default prettier to install
2024-09-19T15:47:03.555639+02:00 [INFO] Starting prettier at path "/Users/juliangarnier/Library/Application Support/Zed/prettier"
2024-09-19T15:47:03.556118+02:00 [INFO] Node runtime install_if_needed
2024-09-19T15:47:03.757511+02:00 [INFO] starting language server. binary path: "/Users/juliangarnier/Library/Application Support/Zed/node/node-v22.5.1-darwin-x64/bin/node", working directory: "/Users/juliangarnier/Library/Application Support/Zed/prettier", args: ["/Users/juliangarnier/Library/Application Support/Zed/prettier/prettier_server.js", "/Users/juliangarnier/Library/Application Support/Zed/prettier"]
2024-09-19T15:47:03.885961+02:00 [INFO] Started default prettier in "/Users/juliangarnier/Library/Application Support/Zed/prettier"
2024-09-19T15:56:29.257937+02:00 [INFO] open paths ["/Users/juliangarnier/.config/zed/keymap.json"]
2024-09-19T15:56:34.189862+02:00 [INFO] open paths ["/Users/juliangarnier/.config/zed/keymap.json"]
2024-09-19T15:56:34.192399+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-19T15:59:14.336517+02:00 [ERROR] Invalid keystroke `cms-``
2024-09-19T15:59:44.919408+02:00 [ERROR] Invalid keystroke `cms-``
2024-09-19T16:00:14.70315+02:00 [ERROR] Invalid keystroke `cms-``
2024-09-19T16:01:49.924948+02:00 [ERROR] Invalid keystroke `cms-``
2024-09-19T16:02:45.249346+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-19T16:02:52.58677+02:00 [ERROR] Invalid keystroke `cms-\`
2024-09-19T16:02:57.027014+02:00 [ERROR] Invalid keystroke `cms-\`
2024-09-19T16:02:59.862325+02:00 [ERROR] Invalid keystroke `cms-\`
2024-09-19T16:03:05.020718+02:00 [ERROR] Invalid keystroke `cms-\`
2024-09-19T16:03:16.220897+02:00 [ERROR] Invalid keystroke `cms-\`
@notpeter
Copy link
Member

notpeter commented Sep 20, 2024

We are aware issues involving Mac keyboard shortcuts in non US locales with dead keys, conflicts with built in MacOS shortcuts and whatever the thing you're describing is called where "this key in my layout is where this other key is in this different layout and MacOS is doing something tricky" (e.g. MacOS uses cmd-shift-[ and cmd-shift-] to navigate tabs, but on some german boards the keys those keys aren't there, so it uses cmd-shift-Ö and cmd-shift-Ä but it remaps those under the hood). We're working on getting it sorted.

Relatedly, we are currently only generating MacOS menu structure (with keybind labels) once at startup with the default keybindings as labels and not applying user's keymap.json overrides to those defaults -- this is why your rebind is not being reflected in the menu.

As a workaround for the menu item issue, you may be able to specifically assign an alternate keyboard shortcut to "Split Right" using the Keyboard->Keyboard Shortcuts->App Shortcuts system preferences pane. Basically if you add a new crazy shortcut (e.g. cmd-shift-option-ctrl-f to "Split Right") and MacOS will override the shortcut in the menu instead of showing cmd-`.

Closing as duplicate. There is more discussion here:

Thanks for reporting.

@notpeter notpeter added macOS Platform-specific feedback for macOS behaviors, features, design, etc keybinds Keyboard shortcuts, mapping, binding, keymaps, etc duplicate Additional reports of an existing issue and removed triage bug [core label] labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Additional reports of an existing issue keybinds Keyboard shortcuts, mapping, binding, keymaps, etc macOS Platform-specific feedback for macOS behaviors, features, design, etc
Projects
None yet
Development

No branches or pull requests

2 participants