How to repeat a key in mac while holding down? I've tried searching for an app or tools that can do this in macOS but I couldn't find any. 

There seems to be a key repeat setting in system prefs but it seems to have no effect. For example in notes, if I hold a key it would not repeat?

Ideally I can have the key repeat behaviour on and off as I only want it during the day for work activities
There is a terminal command to set the option. Go to terminal and type

defaults write -g ApplePressAndHoldEnabled -bool false

This actually turns it on. You have to restart your computer for this to take effect.  You turn it off by typing the same line with true instead of false.  

defaults write -g ApplePressAndHoldEnabled -bool true