Unable to unlock screen as keyboard has disappeared so unable to enter password.
You may try below solutions in descending order if any of them do not work for you. I have added them in descending order of efforts required.
- Restart the device.
- Hard/force restart your device by holding down the Power button and the Volume-down button at the same time for more than 7 seconds.
- It may be the case that there is no/very less space for keyboard app to load. If you think you were low on internal storage, try freeing up internal storage and making more space. You may try these by migrating your data from internal storage to your external storage or a PC/Laptop.
- Enter Safe Mode and disable the password. You may also remove junk data and make more space available in internal storage. To enter safe mode, Power off the device, press and hold the Power key for one or two seconds to turn on the device. When the Samsung logo "samsung" displays, press and hold the Volume down key until the lock screen displays. When the Lock screen is displayed, 'Safe mode' will be displayed on the lower-left corner of the screen.
- As suggested by @esQmo_ flash a stock firmware using Odin. Flashing with Odin does not remove the user data.