I want to add two pieces of additional information. First, I removed nvidia-kernel-dkms and rebooted. The problem persists so I guess this package does not affect the bug.
Second, similar to the aforementioned problem with keepasxc, I cannot finish entering a password into pinentry, which is used by the gpg-agent to get the private key's passphrase. I have to click on the OK button. I am unsure whether this is related to the problem with the arrow keys, though.