There isn't a way to code directly in Construct 2, but you can write your own plugins using JavaScript.
I'd tend to agree that it can be quicker to code directly, but I make heavy use of the shortcut keys and the action/condition search feature (which is automatically activated when you start typing) to work quickly in the event sheet. You can literally type in everything from the beginning of your conditions to the end of your actions for the vast majority of functions (possibly all of them, but I'm not 100% sure of that).
Personally, and this is coming from someone who understands coding but sucks at remembering the exact commands/syntax all the time, this combination of mouse- and typing-based works brilliantly for me.