1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +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:
Colton Hurst
2025-09-19 13:04:47 -04:00
committed by GitHub
parent d8339f0196
commit 51ed3d8aed
3 changed files with 5 additions and 5 deletions

View File

@@ -32,9 +32,9 @@ pub fn type_input(input: Vec<u16>) -> Result<(), ()> {
let mut keyboard_inputs: Vec<INPUT> = Vec::new(); let mut keyboard_inputs: Vec<INPUT> = Vec::new();
// Release hotkeys // 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_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 { for i in input {
let next_down_input = if i == TAB_KEY { let next_down_input = if i == TAB_KEY {

View File

@@ -7,7 +7,7 @@ import { WindowMain } from "../../main/window.main";
import { stringIsNotUndefinedNullAndEmpty } from "../../utils"; import { stringIsNotUndefinedNullAndEmpty } from "../../utils";
export class MainDesktopAutotypeService { export class MainDesktopAutotypeService {
keySequence: string = "Alt+CommandOrControl+I"; keySequence: string = "CommandOrControl+Shift+B";
constructor( constructor(
private logService: LogService, private logService: LogService,

View File

@@ -86,7 +86,7 @@ export class DesktopAutotypeService {
} }
async matchCiphersToWindowTitle(windowTitle: string): Promise<CipherView[]> { async matchCiphersToWindowTitle(windowTitle: string): Promise<CipherView[]> {
const URI_PREFIX = "APP:"; const URI_PREFIX = "apptitle://";
windowTitle = windowTitle.toLowerCase(); windowTitle = windowTitle.toLowerCase();
const ciphers = await firstValueFrom( const ciphers = await firstValueFrom(
@@ -107,7 +107,7 @@ export class DesktopAutotypeService {
return false; return false;
} }
const uri = u.uri.substring(4).toLowerCase(); const uri = u.uri.substring(URI_PREFIX.length).toLowerCase();
return windowTitle.indexOf(uri) > -1; return windowTitle.indexOf(uri) > -1;
}) })