LOL WHOOPS use a real codepoint for trees!
Move key handling to top-level, and fix the minor fallout.