import * as keyCodes from "../../../key-codes";

const preventedKeys = {
  // submission
  [keyCodes.enter]: true,
  // tabbing
  [keyCodes.tab]: true
};

const preventStandardKeyEvents = (event) => {
  if (preventedKeys[event.keyCode]) {
    event.preventDefault();
  }
};

export default preventStandardKeyEvents;
