I am facing an issue with my global key listener - it only catches single key strokes. How can I modify it to capture combinations like ctrl+enter?
mounted()
{
window.addEventListener
(
"keypress", e =>
{
console.log(e.key);
}
);
},
Input device events
click, contextmenu, DOMMouseScroll, dblclick, gamepadconnected, gamepaddisconnected, keydown, keypress, keyup, MozGamepadButtonDown, MozGamepadButtonUp, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, mousewheel, MozMousePixelScroll, pointerlockchange, pointerlockerror,wheel
None of these events seem to be the solution
The current implementation is not working as expected
"keypress", e =>
{
if (e.ctrlKey)
{
console.log(e.key);
}
}