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

vim: QWERTZ keyboard breaks ^ to move to begin of the line #19738

Closed
1 task done
vpereira opened this issue Oct 25, 2024 · 13 comments · Fixed by #20515
Closed
1 task done

vim: QWERTZ keyboard breaks ^ to move to begin of the line #19738

vpereira opened this issue Oct 25, 2024 · 13 comments · Fixed by #20515
Labels
bug [core label] internationalization Feedback for human language support, translations, etc keymap / key binding Feedback for keyboard shortcuts, key mapping, etc vim

Comments

@vpereira
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I am on vim mode, and pressing ^ don't move the cursor to the first word of the line as expected, and works on vim/nvim. I can fallback pressing 0, but i want to understand if it's a problem on my environment or bug.

Environment

Zed: v0.158.2 (Zed)
OS: macOS 14.4.0
Memory: 36 GiB
Architecture: aarch64

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.

No response

@vpereira vpereira added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Oct 25, 2024
@skejeton
Copy link

Works just fine for me. Do you happen to use a different keyboard layout? On US keyboards, for instance, the caret character is on the number row (Number 6).

In some keyboard layouts, it's either positioned in the home row, or can be a combining character, which will not immediately send a key press to the program as it awaits another key press, in this case you would need to input the caret symbol and then press enter.

As far as I know, Zed adapts to the keyboard layout instead of using scan codes, similarly to Vim.

@JunkuiZhang
Copy link
Contributor

Yeah, this sounds like a keyboard layout thing.

@vpereira
Copy link
Author

Works just fine for me. Do you happen to use a different keyboard layout? On US keyboards, for instance, the caret character is on the number row (Number 6).

Yes a standard macbook M3 german keyboard.

As far as I know, Zed adapts to the keyboard layout instead of using scan codes, similarly to Vim.

Yes i thought the same, vim and neovim work out of the box, with this keyboard layout, zed for some reason couldn't figure it out. Any idea how to debug it further?

@JunkuiZhang
Copy link
Contributor

How to type ^ on german layout?

@vpereira
Copy link
Author

vpereira commented Oct 26, 2024

How to type ^ on german layout?

KB_Germany svg

its located top left.

@JunkuiZhang
Copy link
Contributor

I assume that this key is a dead key? As someone from China, I'm not familiar with dead keys, so I have a few questions:

  • On your keyboard layout, do you need to press ^ + space to output the ^ character?
  • When using nvim or vim, do you use ^ + space to move the cursor to the beginning of the line? Or something else?

@vpereira
Copy link
Author

Hey @JunkuiZhang, thank you for your help!

On your keyboard layout, do you need to press ^ + space to output the ^ character

No, I just press the key on the top left (as depicted in the image) and it works

When using nvim or vim, do you use ^ + space to move the cursor to the beginning of the line? Or something else?

I just use the ^ and it moves to the begin of the line - or to be precise, to the first word of the line. So nvim and vim it works as expected. With zed in vim mode however doesn't.

@notpeter notpeter added vim keymap / key binding Feedback for keyboard shortcuts, key mapping, etc internationalization Feedback for human language support, translations, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Oct 29, 2024
@ConradIrwin ConradIrwin changed the title ^ to move to begin of the line doesn't work in vim mode ^ to move to begin of the line doesn't work in vim mode on a QWERTZ keyboard Nov 1, 2024
@ConradIrwin ConradIrwin changed the title ^ to move to begin of the line doesn't work in vim mode on a QWERTZ keyboard vim: QWERTZ keyboard breaks ^ to move to begin of the line Nov 1, 2024
@ConradIrwin
Copy link
Member

Thanks for reporting, this is a bug, and I'll add it to the list for revamping as part of #17031

@JunkuiZhang
Copy link
Contributor

Hey @JunkuiZhang, thank you for your help!

On your keyboard layout, do you need to press ^ + space to output the ^ character

No, I just press the key on the top left (as depicted in the image) and it works

When using nvim or vim, do you use ^ + space to move the cursor to the beginning of the line? Or something else?

I just use the ^ and it moves to the begin of the line - or to be precise, to the first word of the line. So nvim and vim it works as expected. With zed in vim mode however doesn't.

Do you also only need to press the ^ key to output the ^ character in insert mode? I did a simple test on Windows and found that I need to press ^ space to produce the ^ character. Additionally, in Vim, I also have to use ^ space to move the cursor.

@vpereira
Copy link
Author

vpereira commented Nov 4, 2024

Do you also only need to press the ^ key to output the ^ character in insert mode?

In Vim, and in Zed, in insert mode, just pressing ^ is enough to print the ^ character.

@JunkuiZhang
Copy link
Contributor

JunkuiZhang commented Nov 4, 2024

In Vim, and in Zed, in insert mode, just pressing ^ is enough to print the ^ character.

Interesting, so I guess macOS handle this differently from Windows. BTW, I'm gonna buy an ISO german keyboard for testing, dose the keyboard look the same with the one you are using?

And is the left-bottom Strg key a ctrl key?

Screenshot 2024-11-04 200806

@vpereira
Copy link
Author

vpereira commented Nov 4, 2024

Interesting, so I guess macOS handle this differently from Windows. BTW, I'm gonna buy an ISO german keyboard for testing, dose the keyboard look the same with the one you are using?

Yes

And is the left-bottom Strg key a ctrl key?

Yes! "strg" means "Steuerung" which translates to "Control"

@JunkuiZhang
Copy link
Contributor

Interesting, so I guess macOS handle this differently from Windows. BTW, I'm gonna buy an ISO german keyboard for testing, dose the keyboard look the same with the one you are using?

Yes

And is the left-bottom Strg key a ctrl key?

Yes! "strg" means "Steuerung" which translates to "Control"

Great, thanks!

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@JosephTLyons JosephTLyons removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] internationalization Feedback for human language support, translations, etc keymap / key binding Feedback for keyboard shortcuts, key mapping, etc vim
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants