I do not know whether your problem could be remedied by the following approach, but perhaps you may find inspiration from this thread below, started by myself in August 2021. Please read through the whole thread to learn what the problem was and how I solved it.
I have tried to set the input rate via xset r rate 180 76 which led every key beeing input either 0 times or like 10-20 times on single press. So I reverted that.
I just changed the keyboard model in the System Settings > Hardware > Keyboard to “Generic 104-key | PC” (I believe the selected value is not that important). After that the proccess kglobalaccel5 starts using 100% CPU for a while and when this finishes the keyboard input is now back to normal.