Create keyHandling.js

Code for key handling