function componentFactory(Component, hotKeysOptions = {}) {
  /**
   * Component that listens to key events when one of its children are in focus and
   * selectively triggers actions (that may be handled by handler functions) when a
   * sequence of events matches a list of pre-defined sequences or combinations
   * @class
   */
  return class HotKeysEnabled extends PureComponent {
    static propTypes = propTypes;

    constructor(props) {
      super(props);

      this._manager = new FocusOnlyComponentManager(hotKeysOptions, props);
    }

    componentDidMount() {
      this._manager.addHotKeys(this.context.hotKeysParentId);
    }

    componentDidUpdate() {
      this._manager.updateHotKeys(this.props);
    }

    componentWillUnmount(){
      this._manager.removeKeyMap(this.props);
    }

    render() {
      const {keyMap, handlers, allowChanges, root, ...props} = this.props;

      return (
        <Component
          hotKeys={ this._manager.getComponentProps(this.props) }
          { ...props }
        />
      );
    }
  }
}
Wraps a React component in a HotKeysEnabled component, which passes down the
callbacks and options necessary for React Hotkeys to work as a single prop value,
hotkeys. These must be unwrapped and applied to a DOM-mountable element within
the wrapped component (e.g. div, span, input, etc) in order for the key events
to be recorded.

@param {React.ComponentClass} Component - Component class to wrap
@param {Object} hotKeysOptions - Options that become the wrapping component's
                default prop values
@returns {React.ComponentClass} Wrapped component that is passed all of the React hotkeys
props in a single value, hotkeys.