Both: Key Repeat & Press and Hold

Solution 1:

For every app you want key repeat to work in, run

defaults write <bundle-ID> ApplePressAndHoldEnabled -bool false

…then restart the app.