feat(hotkey): make the new-entry hotkey configurable + fix tray title capture
Part A — Ctrl+Shift+A (new entry from window title) is now editable like the other 3 global hotkeys, following the same pattern end to end: state.newEntryHotkey (synced), a capture button in Settings > Autofill, dup cross-check, reset-to- defaults, autofillPushHotkeys, and Bridge.setAutofillHotkeys carrying ne_mods/ ne_vk. Delphi gets SetNewEntryHotkey + stores the live combo (FNewEntryHotkeyMods/ Vk) so ExecuteAutofill's post-fill re-register uses the user's combo instead of resetting to Ctrl+Shift+A. UMainForm parses ne_* unconditionally (works with autofill off). Part B — new-entry from the tray pre-filled the title with "Password Manager": GetForegroundWindow resolved to our own hidden window. Only capture the title when the foreground window belongs to another process; otherwise pass '' (blank). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -874,6 +874,16 @@ begin
|
||||
LogLine(Format('Quick-search hotkey set — mods:%d vk:%d (ok=%s)',
|
||||
[LQsMods, LQsVk, BoolToStr(LQsOk, True)]));
|
||||
end;
|
||||
// New-entry combo — also independent of the autofill enabled flag
|
||||
// (Ctrl+Shift+A works even with autofill turned off).
|
||||
if GetParam('ne_vk') <> '' then
|
||||
begin
|
||||
var LNeMods := Word(StrToIntDef(GetParam('ne_mods'), 6));
|
||||
var LNeVk := Word(StrToIntDef(GetParam('ne_vk'), Ord('A')));
|
||||
var LNeOk := FBridge.SetNewEntryHotkey(LNeMods, LNeVk);
|
||||
LogLine(Format('New-entry hotkey set — mods:%d vk:%d (ok=%s)',
|
||||
[LNeMods, LNeVk, BoolToStr(LNeOk, True)]));
|
||||
end;
|
||||
if GetParam('enabled') <> '1' then
|
||||
begin
|
||||
FBridge.UnregisterAutofillHotkey;
|
||||
|
||||
Reference in New Issue
Block a user