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:
1
apps/desktop/desktop_native/napi/index.d.ts
vendored
1
apps/desktop/desktop_native/napi/index.d.ts
vendored
@@ -210,4 +210,5 @@ export declare namespace logging {
|
||||
}
|
||||
export declare namespace autotype {
|
||||
export function getForegroundWindowTitle(): string
|
||||
export function typeInput(input: Array<number>): void
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user