gitlab-org--gitlab-foss/spec/javascripts/issue_show/helpers.js
2017-06-24 13:32:31 +01:00

10 lines
259 B
JavaScript

// eslint-disable-next-line import/prefer-default-export
export const keyboardDownEvent = (code, metaKey = false, ctrlKey = false) => {
const e = new CustomEvent('keydown');
e.keyCode = code;
e.metaKey = metaKey;
e.ctrlKey = ctrlKey;
return e;
};