Instead of taking printscreen or pasting a plain text in your Keynote presentations, follow these steps and make it beautiful.
brew install highlighthighlight -O rtf filename.js |pbcopy- Paste in your presentation
If you use fish shell, you could use the code_to_keynote function in this gist, see how:
vim ~/.config/fish/functions/code_to_keynote.fishand paste my function- reload your fish
. ~/.config/fish/config.fish code_to_keynote filename.js- Paste in your presentation