bpmn-js/test/util/KeyEvents.js

12 lines
243 B
JavaScript

'use strict';
export function createKeyEvent(element, code, ctrlKey) {
var e = document.createEvent('Events') || new document.defaultView.CustomEvent('keyEvent');
e.keyCode = code;
e.which = code;
e.ctrlKey = ctrlKey;
return e;
}