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.57k stars 2.64k forks source link

Problem with Function Keys on Keyboard 65% [67-keys] #4435

Open brunoalvs opened 11 months ago

brunoalvs commented 11 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I am encountering an issue with my NuPhy Studio Halo65 67-keys keyboard, which has an American layout. Specifically, the problem lies with the keys "`" (backtick) and "~" (tilde backtick), which are located adjacent to the ESC key. To access these characters, I need to use the FN key in conjunction with the respective key. However, this functionality is not working as expected within the open-source text editor, despite functioning correctly in other applications and within the operating system itself.

Details:

Keyboard Model: NuPhy Studio Halo65 67-keys Layout: American (US) Key in Question: "`" (backtick) and "~" (tilde backtick) Functionality Issue: The need to use the FN key to access these characters within the open-source text editor. Expected Behavior: The FN key should function as intended within the text editor, allowing for the proper use of the "`" and "~" characters.

Steps to Reproduce:

  1. Open the Zed
  2. Ensure that the 65% keyboard is connected and recognized.
  3. Attempt to use the "`" and "~" characters by pressing the FN key in conjunction with the respective key.
  4. Observe that the characters may not be input as expected or that the FN key does not seem to function within the text editor.

Environment

Zed: v0.105.5 (stable) OS: macOS 13.5.2 Memory: 32 GiB Architecture: aarch64

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

fuzenco commented 10 months ago

Wonder if this is related to an issue I noted previously of the Option key not functioning for certain characters.

justinrclarke commented 6 months ago

I'm experiencing this same issue, with the same keyboard. Copy/paste a tilde from the Raycast prompt, or any other application that takes text input. I don't have any keybindings updated or changed on Zed, nor any other text editors, I only have this issue with Zed.

Cosmeeeen commented 6 months ago

Having the same issue, until a fix is found, I was able to find this workaround using the key bindings (because copy-pasting the character got annoying):

[
  {
    "bindings": {
      "fn-w": ["workspace::SendKeystrokes", "\u0060"],
      "fn-shift-w": ["workspace::SendKeystrokes", "\u007E"]
    }
  }
]

While looking for this, I also found out that including escape in the keypresses does not work. This is the reason why fn-w (respectively fn-shift-w) are the used keystrokes instead of the default fn-escape / fn-shift-escape

brunoalvs commented 5 months ago

Having the same issue, until a fix is found, I was able to find this workaround using the key bindings (because copy-pasting the character got annoying):

[
  {
    "bindings": {
      "fn-w": ["workspace::SendKeystrokes", "\u0060"],
      "fn-shift-w": ["workspace::SendKeystrokes", "\u007E"]
    }
  }
]

While looking for this, I also found out that including escape in the keypresses does not work. This is the reason why fn-w (respectively fn-shift-w) are the used keystrokes instead of the default fn-escape / fn-shift-escape

Great, I'll do the same. But in my case the fn-w key is used to switch between the devices connected.

amitchahalgits commented 4 months ago

Same issue here.

r0ob3n1337 commented 1 month ago

Same issue here. I use keybindings for resolve, but... It's not funny

[
  {
    "context": "Editor",
    "bindings": {
      "alt-'": ["workspace::SendKeystrokes", "`"]
    }
  }
]
notpeter commented 1 week ago

@SomeoneToIgnore You mentioned in Slack you had a NuPhy keyboards, maybe you can reproduce?

SomeoneToIgnore commented 1 week ago

I have a 75% one only, that does not require pressing Fn for any of the backticks, so cannot reproduce this really.