1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-15 00:35:07 +00:00

Optimize the key usage experience

This commit is contained in:
Tw93
2025-11-15 12:28:34 +08:00
parent 9b6eee968e
commit 78f5341a68
7 changed files with 25 additions and 34 deletions

View File

@@ -144,6 +144,7 @@ show_menu() {
if is_touchid_configured; then
echo -ne "${PURPLE}${NC} Press ${GREEN}Enter${NC} to disable, ${GRAY}Q${NC} to quit: "
IFS= read -r -s -n1 key || key=""
drain_pending_input # Clean up any escape sequence remnants
echo ""
case "$key" in
@@ -162,6 +163,7 @@ show_menu() {
else
echo -ne "${PURPLE}${NC} Press ${GREEN}Enter${NC} to enable, ${GRAY}Q${NC} to quit: "
IFS= read -r -s -n1 key || key=""
drain_pending_input # Clean up any escape sequence remnants
case "$key" in
$'\e') # ESC