async function triggerKeyEvent( target, eventType, key, modifiers = DEFAULT_MODIFIERS ) {
	if ( KEYBOARD_EVENT_TYPES.indexOf( eventType ) === -1 ) {
		throw new Error( "Invalid key event type" );
	}
	if ( typeof key !== "string" || !key.length ) {
		throw new Error( "Must provide a `key` to `triggerKeyEvent`" );
	}

	const keyCode = keyCodeFromKey( key );
	const props = { key, keyCode, which: keyCode };
	const options = Object.assign( props, modifiers );

	return await triggerEvent( target, eventType, options );
}
Triggers a keyboard event of given type in the target element.
Based on @ember/test-helpers, but simplified and also returns its fired event

@param {string|Element} target the element or selector to trigger the event on
@param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger
@param {number|string} key the `key`(string) of the event being triggered
@param {Object} [modifiers]
@param {boolean} [modifiers.ctrlKey=false]
@param {boolean} [modifiers.altKey=false]
@param {boolean} [modifiers.shiftKey=false]
@param {boolean} [modifiers.metaKey=false]
@return {Promise<Event>}