Open ighaouar opened 2 days ago
The code you provided should work. What is the problem?
I am trying to send any key to the tab or any mouse move to avoid an idle timeout but it doesn't work.
If you simulate a click, browser ignores it. There is no way to fix this. If you are on Chrome, use https://chromewebstore.google.com/detail/caffeine-keep-awake/fcblbbbkcneogddmpmfdchnocbpfpmag
By "idle timeout", I meant that I am signed into a website and I am logged out after 15 minutes when I am not browsing or not moving my mouse in the corresponding browser tab.
I was not referring to a windows session lock or a system entering to hibernation mode.
Hi,
Is it possible to add "KeyboardEvent" as a supported action in injected scripts to simulate a KeyPress.
Example:
{ const script = document.currentScript; const event = new KeyboardEvent('keydown', { key: 'a', // The key you want to simulate bubbles: true, // Whether the event bubbles up through the DOM cancelable: true // Whether the event is cancelable});
window.setTimeout(() => { script.dispatchEvent(event)); }, 500); }