I have manjaro gnome installed on my Lenovo legion y540. Recently I installed i3wm, everything works fine except sometimes the keyboard does not work. If I use my mouse and do some clicks here and there, then it starts working again. I don’t know what to search on google as I don’t the problem exactly.
Have you tried an external keyboard already and see if you can reproduce it there?
If you can reproduce this on an external keyboard: Please try creating a new user and logging in there and try to reproduce it there and report back with your findings.
If you cannot reproduce this on an external keyboard: Your internal keyboard might be just dirty: try vacuum cleaning it on the lowest setting and if the issue persists, have it replaced; it’s broken.
If you don’t have another keyboard to test this with, talk to your mum / dad / uncle / aunt / GF / BF and borrow theirs for an hour or so.
I’m experiencing the same Problem on a T14, though I did not install i3wm. The keyboard occasionally doesn’t respond. The only input it recognizes is the Super key. After pressing it, everything works normally again.