mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-26013] Small Autotype Updates (#16498)
* [PM-26013] Update the default hotkey and change the uri scheme for autotype. * [PM-26013] Edit the matching logic for the autotype uri prefix.
This commit is contained in:
@@ -32,9 +32,9 @@ pub fn type_input(input: Vec<u16>) -> Result<(), ()> {
|
||||
let mut keyboard_inputs: Vec<INPUT> = Vec::new();
|
||||
|
||||
// Release hotkeys
|
||||
keyboard_inputs.push(build_virtual_key_input(InputKeyPress::Up, 0x12)); // alt
|
||||
keyboard_inputs.push(build_virtual_key_input(InputKeyPress::Up, 0x11)); // ctrl
|
||||
keyboard_inputs.push(build_unicode_input(InputKeyPress::Up, 105)); // i
|
||||
keyboard_inputs.push(build_virtual_key_input(InputKeyPress::Up, 0x10)); // shift
|
||||
keyboard_inputs.push(build_unicode_input(InputKeyPress::Up, 42)); // b
|
||||
|
||||
for i in input {
|
||||
let next_down_input = if i == TAB_KEY {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { WindowMain } from "../../main/window.main";
|
||||
import { stringIsNotUndefinedNullAndEmpty } from "../../utils";
|
||||
|
||||
export class MainDesktopAutotypeService {
|
||||
keySequence: string = "Alt+CommandOrControl+I";
|
||||
keySequence: string = "CommandOrControl+Shift+B";
|
||||
|
||||
constructor(
|
||||
private logService: LogService,
|
||||
|
||||
@@ -86,7 +86,7 @@ export class DesktopAutotypeService {
|
||||
}
|
||||
|
||||
async matchCiphersToWindowTitle(windowTitle: string): Promise<CipherView[]> {
|
||||
const URI_PREFIX = "APP:";
|
||||
const URI_PREFIX = "apptitle://";
|
||||
windowTitle = windowTitle.toLowerCase();
|
||||
|
||||
const ciphers = await firstValueFrom(
|
||||
@@ -107,7 +107,7 @@ export class DesktopAutotypeService {
|
||||
return false;
|
||||
}
|
||||
|
||||
const uri = u.uri.substring(4).toLowerCase();
|
||||
const uri = u.uri.substring(URI_PREFIX.length).toLowerCase();
|
||||
|
||||
return windowTitle.indexOf(uri) > -1;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user