function keydown (node, key = 'enter') {
	const {which, code} = keyMap[key];
	const evt = new window.KeyboardEvent('keydown', {
		bubbles: true,
		keyCode: which,
		which,
		charCode: which,
		key: code,
		code
	});
	if (node.focus) node.focus();
	node.dispatchEvent(evt);
}
// Emulates a keydown event on a node
Emulates a keydown event on a node
Emulates a keydown event on a node
function keydown (node, key = 'enter') {
	const {which, code} = keyMap[key];
	const evt = new window.KeyboardEvent('keydown', {
		bubbles: true,
		keyCode: which,
		which,
		charCode: which,
		key: code,
		code
	});
	if (node.focus) node.focus();
	node.dispatchEvent(evt);
}
function keydown ( node , key = 'enter' ) { const { which , code } = keyMap [ key ] ; const evt = new window . KeyboardEvent ( 'keydown' , { bubbles : true , keyCode : which , which , charCode : which , key : code , code } ) ; if ( node . focus ) node . focus ( ) ; node . dispatchEvent ( evt ) ; }
Emulates a keydown event on a node
Emulates a keydown event on a node