keyboard handling and  require.js