static/src/core/keys.js
/**
   * Queued to trigger repeat keystrokes. Queues another stroke if the control is still active.
   *
   * @param {string} key to repeat send
   */
Queued to trigger repeat keystrokes. Queues another stroke if the control is still active.
@param {string} key to repeat send
Queued to trigger repeat keystrokes . Queues another stroke if the control is still active . @param { string } key to repeat send
function repeatKey(key) {
    const {control, hidden} = global.getState();
    if (!control || hidden) {
      return false;
    }
    buttonsActive[key] = window.setTimeout(() => repeatKey(key), followingRepeat);
    const payload = {
      key,
      keyCode: keycodeMap[key],
      repeat: true,
    };
    control.send({type: 'keydown', payload});
  }
function repeatKey ( key ) { const { control , hidden } = global . getState ( ) ; if ( ! control || hidden ) { return false ; } buttonsActive [ key ] = window . setTimeout ( ( ) => repeatKey ( key ) , followingRepeat ) ; const payload = { key , keyCode : keycodeMap [ key ] , repeat : true , } ; control . send ( { type : 'keydown' , payload } ) ; }
Queued to trigger repeat keystrokes.
Queued to trigger repeat keystrokes .
// TODO: could be combined with a rAF.