code: function saveCommand(windowId, frame, cmd, data){
      if(isModuleLoading){
          return;
      }
      var cmdInfo = {
          window: windowId,
          frame: frame,
          cmd: cmd,
          data: data,
          fix: false
      };
  
      checkLostKey(windowId);
  
      switch(cmd){
          case 'keyDown':
              allKeyMap[data.character] = cmdInfo;
              break;
          case 'keyUp':
              delete allKeyMap[data.character];
              break;
          case 'mouseDown':
              allMouseMap[data.button] = cmdInfo;
              break;
          case 'mouseUp':
              delete allMouseMap[data.button];
              break;
      }
  
      execNextCommand(cmdInfo);
  }
docs: save recoreded command