If you are unable to log into your Mac due to a malfunctioning keyboard, there are several alternative methods available. First, you can use the built-in VoiceOver feature if your Mac is running macOS Mojave or later. This allows users to control their computer through spoken commands and will enable them to log in with just their voice. Secondly, you can connect an external mouse and keyboard via USB or Bluetooth for temporary access until the internal hardware is serviced or replaced. Finally, if all else fails, it may be possible to reset your login password from another device such as an Apple Watch or iOS device by using iCloud Keychain's AutoFill passwords feature.