fix(lock): lock screen swallowed every keystroke; add Ctrl+L to lock

The renderer-side guard added in v1.0.17 called preventDefault on every
keydown while locked. A keydown's default action IS inserting the
character into the focused field, so the lock screen's password box
received nothing and a locked app could never be unlocked. Menu
accelerators are already stopped in main (before-input-event); the
renderer guard now just skips its own logic.

Also: Ctrl+L locks the screen from anywhere in the app, terminals
included. The chord is only taken when a lock actually engages, so an
unconfigured app keeps Ctrl+L for the shell's clear-screen.
This commit is contained in:
Bill committed 2026-09-24 22:53:27 +08:00
1 parent 244199c512
commit 83dc3f15cc
7 files changed
+31 -15

No files matched your search

+1 -1
View File
@@ -126,7 +126,7 @@ const settings: Record<string, string> = {
'settings.lock.lockAtStartup': '启动时锁屏',
'settings.lock.lockAtStartupDesc': '每次启动后先要求输入密码',
'settings.lock.lockNow': '立即锁屏',
'settings.lock.lockNowDesc': '马上锁定主窗口(会话保持运行)',
'settings.lock.lockNowDesc': '马上锁定主窗口(会话保持运行,快捷键 Ctrl+L)',
'settings.lock.title': '已锁定',
'settings.lock.screenDesc': '输入锁屏密码解锁',
'settings.lock.passwordPlaceholder': '密码',