Those are hardware issues, unfortunately.
All recent releases of Lineage (including mine) have a workaround implemented in the keyboard driver that suppresses unwanted multiple keystrokes (https://review.lineageos.org/c/LineageOS/android_kernel_fxtec_msm8998/+/318274).
For the undetected keypresses, there is unfortunately no software fix. I have three Pro1s. One (the oldest) has that issue to the point where the keyboard is almost unusable, the second has one or two keys that sometimes need two presses to react. Only my most recent device has a flawless keyboard.
All three run t