1

My macbook's (running Catalina) internal keyboard is misbehaving after a water spill. It thinks the ctrl key is pressed. With an external usb keyboard i am able to get to the recovery mode, enter passwd and mount/access the file system as root. But the external keyboard doesn't work in the login screen (behaves the same way as the internal keyboard. Makes me wonder if the keyboard driver works differently in login vs recovery). NVRAM/PRAM and SMC resets are not helping either.

From the command line is there a way to enable the on-screen accessibility keyboard ? Tried "defaults read" on a different machine and i do not see the key for "Accessibility keyboard". Or any other option to bypass the login screen from recovery mode ?

1 Answer 1

1

Once booted to macOS Recovery, then from the Utilities menu, click Terminal.

In Terminal type the following, e.g., commands and press enter after each:

/usr/libexec/PlistBuddy -c "Add :accessibilitySettings dict" '/Volumes/Macintosh HD/Library/Preferences/com.apple.loginwindow.plist'
/usr/libexec/PlistBuddy -c "Add :accessibilitySettings:virtualKeyboardOnOff bool 1" '/Volumes/Macintosh HD/Library/Preferences/com.apple.loginwindow.plist'

Then type reboot and press: enter


Notes:

The PlistBuddy commands above were tested from macOS Recovery on a system running macOS Catalina in which the Accessibility Keyboard had not previously been turned on under: System Preferences > Users & Groups > Login Options > Accessibility Options…

If the Accessibility Keyboard had previously been turned on and off again, then it can be changed using just:

/usr/libexec/PlistBuddy -c "Set :accessibilitySettings:virtualKeyboardOnOff 1" '/Volumes/Macintosh HD/Library/Preferences/com.apple.loginwindow.plist'

You can check to see what already exists with the following command:

/usr/libexec/PlistBuddy -c "Print" '/Volumes/Macintosh HD/Library/Preferences/com.apple.loginwindow.plist'

In the PlistBuddy command, if Macintosh HD is not the name of your normal Startup Disk, then change it as appropriate. If you are not sure or do not remember, then in Terminal type ls -1 /Volumes and press enter. It will be of the same name as the one with - Data in it but use the one without it.

4
  • Thanks for the instructions. I was able to add the virtualKeyboardOnOff. But the login screen doesn't come with the onscreen keyboard. I deleted the whole com.apple.loginwindow.plist and rebooted. It did create an empty plist file. Then i added only virtualKeyboardOnOff and LoginwindowText to see if at least the text shows up.. neither showed up. Appears like its not using the loginwindow plist in mycase or overriding it for some reason.
    – gvse
    Commented Sep 29, 2021 at 19:28
  • @gvse, Obviously this does work for me as stated otherwise I would not have taken the time to document this in an answer. Are you sure you typed everything properly? Did you use the /usr/libexec/PlistBuddy -c "Print" ... first to see what you already had, and then check it again after making the changes? Also, you should never arbitrarily delete a system level .plist file, just rename it if you what to create it anew. Having the original to review is always important in a case such as this. Commented Sep 29, 2021 at 19:36
  • Yes I did check its content with "defaults read /Volumes/Macintosh\ HD/Library/Preferences/com.apple.loginwindow.plist" and verified before and after any change. I took a backup of the file before deleting. The reason for deleting is, i thought there were issues/corrupted and was ignoring the file. I made some progress with keyboard issue. I opened up the laptop and disconnected the cable that interconnected the keyboard/trackpad to the main board. After that i could login with an external keyboard.
    – gvse
    Commented Sep 30, 2021 at 0:03
  • I verified the System Pref->User&Groups->Login options and the setting is there. But it still doesnt work on the main login screen after a restart. It does show up on the login screen that is shown after i logout. So looks like in my case its driven from 2 different configs ? Now i am left with bypassing the whole login screen (might have to disable the filevault).
    – gvse
    Commented Sep 30, 2021 at 0:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .