I had just fired up copilot and thought that was the cause. I was editing a file in VSCode and had the Vim extension installed. I use HJKL to move around a file, often holding down the key to move multiple lines. It stopped working. The K key would also pop up an Apple press and hold autocomplete suggestion that just contained a single k.
I removed the CoPilot extension and this behavior continued. After much search, found this SO question.
This command turns off ApplePressAndHold for the VSCode application...
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
Set True to re-enable.
UPDATE:
Had the same issue with Windsurf/Codeium. Tried the following
defaults write --app Windsurf.app ApplePressAndHoldEnabled -bool false
The --app flag threw an error. To find the Bundle ID of an application:
codesign -dr - /Applications/Windsurf.app
Executable=/Applications/Windsurf.app/Contents/MacOS/Electron
designated => identifier "com.exafunction.windsurf" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "83Z2LHX6XW"
So, the following worked for Windsurf...
defaults write com.exafunction.windsurf ApplePressAndHoldEnabled -bool false