1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-08 18:29:19 +00:00
This commit is contained in:
Tw93
2025-11-15 10:01:21 +08:00
parent 72caed7da2
commit 1cb87c67e8
5 changed files with 8 additions and 8 deletions

View File

@@ -296,7 +296,7 @@ read_key() {
$'\x7f' | $'\x08') echo "DELETE" ;; # Backspace/Delete key
$'\x1b')
# ESC sequence - could be arrow key, delete key, or ESC alone
# Read the next two bytes within 1s
# Read the next bytes with 1s timeout for maximum compatibility
if IFS= read -r -s -n 1 -t 1 rest 2> /dev/null; then
if [[ "$rest" == "[" ]]; then
# Got ESC [, read next character