mouse updates from root-monitor were added to prototype

This commit is contained in:
Tom Odem 2024-05-08 18:39:13 -07:00
parent fd3b4cc2de
commit f360754c61

View File

@ -81,7 +81,7 @@ const Layout = () => {
}, [keyDown]);
useEffect(() => {
if (mouseButtonDown.toString() !== '') {
if (mouseButtonDown.toString() !== '3') {
const time = new Date().toISOString();
dispatch(
addKeyDown({
@ -104,10 +104,10 @@ const Layout = () => {
}, [keyUp]);
useEffect(() => {
if (mouseButtonUp !== '') {
if (mouseButtonUp !== '3') {
dispatch(removeKeyDown(mouseButtonUp.toString()));
document.dispatchEvent(new KeyboardEvent('mouseup', { key: '_' }));
document.dispatchEvent(new KeyboardEvent('mousedown', { key: '_' }));
document.dispatchEvent(new MouseEvent('mouseup', { button: 3 }));
document.dispatchEvent(new MouseEvent('mousedown', { button: 3 }));
}
}, [mouseButtonUp]);