@quincarter/create-lit-app 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/create-app-shell.sh +7 -5
- package/package.json +1 -1
package/create-app-shell.sh
CHANGED
|
@@ -167,12 +167,14 @@ read_key() {
|
|
|
167
167
|
local key subkey
|
|
168
168
|
IFS= read -r -s -n1 key 2>/dev/null || true
|
|
169
169
|
if [[ "$key" == $'\x1b' ]]; then
|
|
170
|
-
|
|
170
|
+
stty min 0 time 1 2>/dev/null || true
|
|
171
|
+
read -r -s -n2 subkey 2>/dev/null || true
|
|
172
|
+
stty min 1 time 0 2>/dev/null || true
|
|
171
173
|
case "$subkey" in
|
|
172
|
-
"[A") echo "UP" ;;
|
|
173
|
-
"[B") echo "DOWN" ;;
|
|
174
|
-
"[C") echo "RIGHT" ;;
|
|
175
|
-
"[D") echo "LEFT" ;;
|
|
174
|
+
"[A"|"OA") echo "UP" ;;
|
|
175
|
+
"[B"|"OB") echo "DOWN" ;;
|
|
176
|
+
"[C"|"OC") echo "RIGHT" ;;
|
|
177
|
+
"[D"|"OD") echo "LEFT" ;;
|
|
176
178
|
*) echo "ESC" ;;
|
|
177
179
|
esac
|
|
178
180
|
elif [[ "$key" == "" ]]; then
|