added clearinputbuffer function without ever calling it
This commit is contained in:
+6
-1
@@ -2,7 +2,7 @@
|
|||||||
# One-Key-Installation of macOS on VirtualBox
|
# One-Key-Installation of macOS on VirtualBox
|
||||||
# (c) img2tab, licensed under GPL2.0 or higher
|
# (c) img2tab, licensed under GPL2.0 or higher
|
||||||
# url: https://github.com/img2tab/okiomov
|
# url: https://github.com/img2tab/okiomov
|
||||||
# version 0.26
|
# version 0.27
|
||||||
|
|
||||||
# Requirements: 33.5GB available storage on host
|
# Requirements: 33.5GB available storage on host
|
||||||
# Dependencies: bash>4.0, unzip, wget, dmg2img, VirtualBox>5.2
|
# Dependencies: bash>4.0, unzip, wget, dmg2img, VirtualBox>5.2
|
||||||
@@ -307,6 +307,11 @@ declare -A ksc=(
|
|||||||
["?"]="2A 35 B5 AA"
|
["?"]="2A 35 B5 AA"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# hacky way to clear input buffer before sending scancodes
|
||||||
|
function clearinputbuffer() {
|
||||||
|
while read -d '' -r -t 0; do read -d '' -t 0.1 -n 10000; break; done
|
||||||
|
}
|
||||||
|
|
||||||
# read variable kbstring and convert string to scancodes and send to guest vm
|
# read variable kbstring and convert string to scancodes and send to guest vm
|
||||||
function sendkeys() {
|
function sendkeys() {
|
||||||
scancode=$(for (( i=0; i < ${#kbstring}; i++ ));
|
scancode=$(for (( i=0; i < ${#kbstring}; i++ ));
|
||||||
|
|||||||
Reference in New Issue
Block a user