theblixguy / DroidID

DroidID - Unlock your Mac using your Android phone's fingerprint sensor!
GNU General Public License v3.0
91 stars 15 forks source link

Special chars and lower/uppercases password keystroke bug #2

Closed mikklfr closed 7 years ago

mikklfr commented 7 years ago

Hi,

I could not make it work with password containing symbols like {,: or . and lower/uppercases

For some reason, with a password like "{4.aUsld" the keystroke function is typing "{4.aUSLd"

You can reproduce it in the Apple ScriptEditor

set pword to "{4.aUsld"
display dialog pword

tell application "Terminal"
    activate

    tell application "System Events"
        keystroke pword

        repeat with i from 1 to count characters of pword
            keystroke (character i of pword)
        end repeat
    end tell

end tell

You will see the correct password in the dialog but a wrong one in the terminal.

I fixed it by typing each char individually in the UnlockMac.scpt

repeat with i from 1 to count characters of pword
keystroke (character i of pword)
end repeat
theblixguy commented 7 years ago

Thanks for the fix!