The Android Lollipop update for the HTC One M8 may cause the keyboard to work with flaw, as the keyboard may not open or show when needed. To fix the Keyboard not working on HTC One M8 running Android 5, do one of the following solutions:
1. Long press the Power Button, and tap the Restart option and after rebooting the keyboard will work flawless
2. Press the Power Button repeatedly 4,5 times and then try typing. As you can see the keyboard is open and working
** For sure the second solution is way faster, and each time you face the keyboard issue, you can fix it in a blink of an eye.