keyboard focus behavior; small perfomance optimizations
Merge pull request #415 from kyuri/upstream

keyboard focus behavior; small perfomance optimizations