Changes to menu.js for handling keyboard