Skip to content

[PM-22790] Adds SendInput() Functionality to the Autotype Crate #15751

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

coltonhurst
Copy link
Member

@coltonhurst coltonhurst commented Jul 23, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-22790

📔 Objective

Adds the ability to send UTF-16 encoded characters as keyboard events to the focused location in Windows for the new autotype feature. This feature is behind a feature flag.

Please note, the println will be removed in a future PR, for now it provides logging during development after input insertion:

let e = unsafe { GetLastError().to_hresult().message() };
println!("type_input() called, GetLastError() is: {:?}", e);

(We can eventually use the GetLastError() function for more precise error handling.)

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@coltonhurst coltonhurst self-assigned this Jul 23, 2025
Copy link
Contributor

github-actions bot commented Jul 23, 2025

Logo
Checkmarx One – Scan Summary & Detailsc7a6e6c9-8c27-45ce-8505-9c4c86c48f21

Great job, no security vulnerabilities found in this Pull Request

@coltonhurst coltonhurst marked this pull request as ready for review July 25, 2025 13:08
@coltonhurst coltonhurst requested review from a team as code owners July 25, 2025 13:08
jprusik
jprusik previously approved these changes Jul 25, 2025
dani-garcia
dani-garcia previously approved these changes Jul 25, 2025
Copy link
Member

@dani-garcia dani-garcia left a comment

Choose a reason for hiding this comment

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

LGTM, just some small comments

@coltonhurst coltonhurst dismissed stale reviews from dani-garcia and jprusik via 66e05c3 July 25, 2025 15:10
Copy link

Copy link

codecov bot commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.84%. Comparing base (417c4cd) to head (66e05c3).
⚠️ Report is 23 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/desktop/desktop_native/napi/src/lib.rs 0.00% 6 Missing ⚠️
apps/desktop/desktop_native/autotype/src/lib.rs 0.00% 3 Missing ⚠️
apps/desktop/desktop_native/autotype/src/macos.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15751      +/-   ##
==========================================
+ Coverage   37.59%   37.84%   +0.25%     
==========================================
  Files        3321     3309      -12     
  Lines       94888    94023     -865     
  Branches    14356    14248     -108     
==========================================
- Hits        35674    35586      -88     
+ Misses      57717    56938     -779     
- Partials     1497     1499       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants