zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.53k stars 2.64k forks source link

linux: keybindings containing shift are broken when using ibus under wayland #14358

Open 0xkata opened 1 month ago

0xkata commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Shift key doesn't seem to work on vim mode when ibus wayland is on, cannot do any keymaps starting with shift. It works again after turning off ibus wayland.

Environment

Zed: v0.143.6 (Zed) OS: Linux Wayland fedora 40 Memory: 14.9 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-07-12T14:02:18-04:00 [INFO] ========== starting zed ==========
2024-07-12T14:02:18-04:00 [INFO] perform;
2024-07-12T14:02:18-04:00 [INFO] read_command;
2024-07-12T14:02:18-04:00 [INFO] Opening main db
2024-07-12T14:02:18-04:00 [INFO] read_command;
2024-07-12T14:02:18-04:00 [INFO] socket reader;
2024-07-12T14:02:18-04:00 [INFO] new;
2024-07-12T14:02:18-04:00 [INFO] keep_updated;
2024-07-12T14:02:18-04:00 [INFO] Using git binary path: None
2024-07-12T14:02:18-04:00 [ERROR] theme not found: Catppuccin Macchiato
2024-07-12T14:02:18-04:00 [INFO] extensions updated. loading 2, reloading 0, unloading 0
2024-07-12T14:02:18-04:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-07-12T14:02:18-04:00 [INFO] Opening main db
2024-07-12T14:02:18-04:00 [INFO] perform;
2024-07-12T14:02:18-04:00 [INFO] read_command;
2024-07-12T14:02:18-04:00 [INFO] read_command;
2024-07-12T14:02:18-04:00 [INFO] set environment variables from shell:/bin/fish, path:/var/lib/snapd/snap/bin:/home/kata/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
2024-07-12T14:02:18-04:00 [INFO] socket reader;
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Latte" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Frappé" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Macchiato" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Mocha" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Latte - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Frappé - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Macchiato - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [WARN] Theme "Catppuccin Mocha - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-12T14:02:18-04:00 [INFO] Enabling Vulkan Portability
2024-07-12T14:02:18-04:00 [INFO] Enabling color space support
2024-07-12T14:02:18-04:00 [INFO] Adapter "AMD Radeon 780M (RADV GFX1103_R1)"
2024-07-12T14:02:18-04:00 [INFO] Ray tracing is supported
2024-07-12T14:02:18-04:00 [INFO] Using surface present mode MAILBOX
2024-07-12T14:02:18-04:00 [WARN] Unable to forbid exclusive full screen
2024-07-12T14:02:18-04:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-12T14:02:18-04:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-12T14:02:18-04:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: PreMultiplied }
2024-07-12T14:02:18-04:00 [INFO] Opening main db
2024-07-12T14:02:18-04:00 [INFO] Using surface present mode MAILBOX
2024-07-12T14:02:18-04:00 [WARN] Unable to forbid exclusive full screen
2024-07-12T14:02:18-04:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-07-12T14:02:18-04:00 [INFO] Using surface present mode MAILBOX
2024-07-12T14:02:18-04:00 [WARN] Unable to forbid exclusive full screen
2024-07-12T14:02:18-04:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: PreMultiplied }
2024-07-12T14:02:18-04:00 [INFO] Using surface present mode MAILBOX
2024-07-12T14:02:18-04:00 [WARN] Unable to forbid exclusive full screen
2024-07-12T14:02:18-04:00 [ERROR] No path stored for this editor
2024-07-12T14:02:18-04:00 [ERROR] No path stored for this editor
2024-07-12T14:02:18-04:00 [INFO] Initializing default prettier with plugins {}
2024-07-12T14:02:18-04:00 [INFO] starting language servers for Python: pyright
2024-07-12T14:02:18-04:00 [INFO] starting language server "pyright", path: "/home/kata/Documents/projects/ah_crawler", id: 1
2024-07-12T14:02:18-04:00 [INFO] Initializing default prettier with plugins {}
2024-07-12T14:02:18-04:00 [INFO] starting language servers for Python: pyright
2024-07-12T14:02:18-04:00 [INFO] fetching latest version of language server "pyright"
2024-07-12T14:02:18-04:00 [INFO] Node runtime install_if_needed
2024-07-12T14:02:18-04:00 [INFO] Initializing default prettier with plugins {}
2024-07-12T14:02:18-04:00 [INFO] starting language servers for Python: pyright
2024-07-12T14:02:19-04:00 [INFO] Node runtime install_if_needed
2024-07-12T14:02:19-04:00 [INFO] starting language server. binary path: "/home/kata/.local/share/zed/node/node-v18.15.0-linux-x64/bin/node", working directory: "/", args: ["/home/kata/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-07-12T14:02:19-04:00 [INFO] downloading language server "pyright"
2024-07-12T14:02:19-04:00 [INFO] Node runtime install_if_needed
2024-07-12T14:02:19-04:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-07-12T18:02:19.765Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-07-12T18:02:19.765Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-07-12T14:02:19-04:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "0d5f3797-286c-4d4b-90d3-5fd618544c0e",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-07-12T14:02:19-04:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-07-12T18:02:19.785Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-07-12T18:02:19.785Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-07-12T14:02:19-04:00 [INFO] starting language server. binary path: "/home/kata/.local/share/zed/node/node-v18.15.0-linux-x64/bin/node", working directory: "/home/kata/Documents/projects/ah_crawler", args: ["/home/kata/.local/share/zed/languages/pyright/node_modules/pyright/langserver.index.js", "--stdio"]
2024-07-12T14:02:19-04:00 [INFO] Language server with id 1 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "Pyright language server 1.1.371 starting"
}
2024-07-12T14:02:19-04:00 [INFO] Language server with id 1 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "Server root directory: file:///home/kata/.local/share/zed/languages/pyright/node_modules/pyright/dist"
}
2024-07-12T14:02:20-04:00 [INFO] Language server with id 1 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "Starting service instance \"\""
}
2024-07-12T14:02:20-04:00 [INFO] language server 1: unregistered workspace/DidChangeWatchedFiles capability with id 7620035c-2f60-4c71-ab24-96ed80457e5d
2024-07-12T14:02:20-04:00 [INFO] Using surface present mode MAILBOX
2024-07-12T14:02:20-04:00 [WARN] Unable to forbid exclusive full screen
2024-07-12T14:02:20-04:00 [INFO] Using surface present mode MAILBOX
2024-07-12T14:02:20-04:00 [WARN] Unable to forbid exclusive full screen
2024-07-12T14:02:21-04:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-12T14:02:21-04:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-12T14:02:21-04:00 [INFO] Creating a descriptor pool for at most 256 sets
2024-07-12T14:02:21-04:00 [INFO] Creating a descriptor pool for at most 256 sets

AquilaFasciata commented 1 month ago

This may (or may not) be related to #7512. I'm having the same issue.

It seems that ibus doesn't pass the shift key through -- as a workaround I have the following in my keymap.json:

{
    "context": "vim_mode == normal && vim_operator == none && !VimWaiting",
    "bindings": {
      "O": "vim::InsertLineAbove",
      "A": "vim::InsertEndOfLine",
      "V": "vim::ToggleVisualLine"
    }
  }