Under Character Settings, there's an option called Direct Chat.

Keep that checkbox checked if you want to control nearly everything with the controller and just use the keyboard for chatting. With it selected, whenever you start typing it will automatically move to the chat window and interpret keystrokes as chat text.

If, as Amnesia suggested, you want to use keyboard shortcuts, then turn off Direct Chat. With that checkbox unchecked, you have to explicitly move focus to the chat box before keystrokes will be interpreted as chat text. Otherwise, keystrokes are interpreted according to shortcut settings to perform actions or open menus, etc.

At least on PS3, Direct Chat is selected by default. I'm not certain if the default is the same on PS4, but they do both have the option.