Added native key handling in javascript