Skip to content

fix: support international keyboard characters#51

Merged
andrewtavis merged 2 commits into
scribe-org:mainfrom
Mounil2005:fix/international-keyboard-support
Jun 30, 2026
Merged

fix: support international keyboard characters#51
andrewtavis merged 2 commits into
scribe-org:mainfrom
Mounil2005:fix/international-keyboard-support

Conversation

@Mounil2005

@Mounil2005 Mounil2005 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes the hardcoded allowed_keys() whitelist in lib.rs that only worked for English QWERTY layouts
  • listener.rs now uses rdev's event.name field so the OS handles keyboard layout and Shift state — enabling å, ä, ö, ü, ß, and any other Unicode character
  • Updates the listener→GUI TCP protocol from single-byte to length-prefixed UTF-8 to support multi-byte characters
  • Adds a unicode_characters_captured test to gui.rs

Closes #18
Closes #37

Test plan

  • Build passes: cd scribe && cargo build
  • Tests pass: cd scribe && cargo test
  • Manually type Swedish characters (å, ä, ö) into the command input and verify they appear
  • Verify Backspace still works correctly
  • Verify standard ASCII characters (a-z, 0-9, punctuation) still work

…cribe-org#37)

Replace hardcoded allowed_keys() whitelist with rdev event.name field
so the OS keyboard layout determines which Unicode characters are typed.
Update TCP protocol to length-prefixed UTF-8 to support multi-byte chars.
@github-actions

Copy link
Copy Markdown

Thank you for the pull request! 💙🩵

The Scribe-Desktop team will do our best to address your contribution as soon as we can. The following are some important points:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and Desktop rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the General room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions

Copy link
Copy Markdown

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First PR Commit Check

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution
    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local Scribe-Desktop repo (can be set with git config --global user.email "GITHUB_EMAIL")

@Mounil2005 Mounil2005 marked this pull request as ready for review June 27, 2026 11:36
@andrewtavis

Copy link
Copy Markdown
Member

This is a major shift on how we'll be doing things, so it'd be great to get feedback here, @henrikth93 and @RyanPaulGannon! From there we can discuss what other issues need to be made/prioritized 😊

@andrewtavis

Copy link
Copy Markdown
Member

For now, @Mounil2005, can you fix the formatting as detailed by the failing check?

@Mounil2005

Copy link
Copy Markdown
Contributor Author

For now, @Mounil2005, can you fix the formatting as detailed by the failing check?

Yes! On it!

@Mounil2005

Copy link
Copy Markdown
Contributor Author

This is a major shift on how we'll be doing things, so it'd be great to get feedback here, @henrikth93 and @RyanPaulGannon! From there we can discuss what other issues need to be made/prioritized 😊

Sure, pls let me know the feedback! @henrikth93 @RyanPaulGannon

@henrikth93

Copy link
Copy Markdown
Member

This looks good to me. One thing I am thinking of is the keystrokes, usually I write ü using ¨ + u, but in the desktop prompt I had to use the opt key, opt + u = ü. That is something we can work on in the future.

@henrikth93 henrikth93 closed this Jun 28, 2026
@henrikth93 henrikth93 reopened this Jun 28, 2026

@henrikth93 henrikth93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Mounil2005

Copy link
Copy Markdown
Contributor Author

Thanks for the review! Agreed on the dead key / compose key behavior, that's a separate concern around how the OS handles multi-keystroke character composition and is worth a follow up. If you'd like, I can open a new issue for it and work on it separately!

@henrikth93

Copy link
Copy Markdown
Member

Thanks for the review! Agreed on the dead key / compose key behavior, that's a separate concern around how the OS handles multi-keystroke character composition and is worth a follow up. If you'd like, I can open a new issue for it and work on it separately!

That sounds good to me! Really appreciated!

@andrewtavis andrewtavis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: This is great, @Mounil2005! Thanks for your efforts here :) I'll write into another issue to see if you want to support 😊

@andrewtavis andrewtavis merged commit f656ce0 into scribe-org:main Jun 30, 2026
2 checks passed
@andrewtavis

Copy link
Copy Markdown
Member

And thanks also for the review, @henrikth93! 😊

@Mounil2005

Copy link
Copy Markdown
Contributor Author

praise: This is great, @Mounil2005! Thanks for your efforts here :) I'll write into another issue to see if you want to support 😊

Yes sure! Thanks!

@Mounil2005 Mounil2005 deleted the fix/international-keyboard-support branch July 2, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Moving away from allowed keys Can not write å ä ö

3 participants