app.js 268 B

12345678910
  1. document.getElementById('code').addEventListener('keydown', handleKeydownEvent);
  2. document.getElementById('code').focus();
  3. function handleKeydownEvent(e) {
  4. switch(e.key) {
  5. case 'SoftLeft':
  6. eval(document.getElementById('code').value);
  7. break;
  8. }
  9. }