Yea javascript key handling does tend to look like alien calculus, maybe we can work in a 3rd party lib at some point