1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

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

* [PM-22790] Adds SendInput() functionality to the autotype crate

* [PM-22790] Fixes unused variable linting errors

* [PM-22790] Updated autotype lib.rs comment
This commit is contained in:
Colton Hurst
2025-07-28 16:26:48 -04:00
committed by GitHub
parent f34260bc5e
commit fd727ffc39
6 changed files with 123 additions and 6 deletions

View File

@@ -210,4 +210,5 @@ export declare namespace logging {
}
export declare namespace autotype {
export function getForegroundWindowTitle(): string
export function typeInput(input: Array<number>): void
}

View File

@@ -872,8 +872,15 @@ pub mod autotype {
pub fn get_foreground_window_title() -> napi::Result<String, napi::Status> {
autotype::get_foreground_window_title().map_err(|_| {
napi::Error::from_reason(
"Autotype Error: faild to get foreground window title".to_string(),
"Autotype Error: failed to get foreground window title".to_string(),
)
})
}
#[napi]
pub fn type_input(input: Vec<u16>) -> napi::Result<(), napi::Status> {
autotype::type_input(input).map_err(|_| {
napi::Error::from_reason("Autotype Error: failed to type input".to_string())
})
}
}