Hi,
A mouse scroll event can be detected by easy customization/scripting.
Copy and paste the following codes into onArrive and onLeave properties.
(onArrive)
----------------------------------------------------------------------------
/*
* Firefox
*/
if(window.addEventListener){
window.addEventListener('DOMMouseScroll', function(e){
console.log("addEventListener (Firefox)");
console.log("[Firefox] "+e.detail);
if ( e.detail > 0 )
SENDKEY("PageUp");
else
SENDKEY("PageDown");
}, false);
}
/*
* Chrome/IE/Edge/Safari
*/
window.onmousewheel = function(e){
console.log("onmousewheel enabled (Chrome)");
console.log("[Chrome] "+e.wheelDelta);
if ( e.wheelDelta < 0 )
SENDKEY("PageDown");
else
SENDKEY("PageUp");
};
----------------------------------------------------------------------------
(onLeave)
----------------------------------------------------------------------------
/*
* Firefox
*/
if(window.removeEventListener){
window.addEventListener('DOMMouseScroll', function(e){
console.log("removeEventListener (Firefox)");
}, false);
}
/*
* Chrome/IE/Edge/Safari
*/
window.onmousewheel = function(e){
console.log("onmousewheel disabled (Chrome)");
};
----------------------------------------------------------------------------
The result will be:
https://drive.google.com/file/d/0BwvNUe ... Q4SWM/view
HTH.
Best Regards,
Hidekazu Tanaka
Wheel mouse emulation for Subfile
Moderator: jeanmichel
Re: Wheel mouse emulation for Subfile
Hi Hidekazu Tanaka,
Can we make this a global setting so that we don't have to add onArrive and onLeave on each screen that has subfile page up and down?
Regards,
Safal Piya
Can we make this a global setting so that we don't have to add onArrive and onLeave on each screen that has subfile page up and down?
Regards,
Safal Piya
Regards,
Safal Piya
Safal Piya
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Wheel mouse emulation for Subfile
Hi Safal,
Sorry for delay reply. You might have already tried, but it can be implemented by:
- Coding in onApplicationStart instead of onArrive
- Coding in onApplicationEnd instead of onLeave
In this case, wheel scrolling will be ALWAYS emulated as PageUp/Down on all the screens.
Hope this helps.
Best Regards,
Hidekazu Tanaka
Sorry for delay reply. You might have already tried, but it can be implemented by:
- Coding in onApplicationStart instead of onArrive
- Coding in onApplicationEnd instead of onLeave
In this case, wheel scrolling will be ALWAYS emulated as PageUp/Down on all the screens.
Hope this helps.
Best Regards,
Hidekazu Tanaka
-
Joerg Hamacher
- Posts: 40
- Joined: 09 Mar 2016, 00:29
Re: Wheel mouse emulation for Subfile
Hi Hidekazu,
this is a great script.
My problem with it is that whenputting it into "onApplicationStart" it is active in the complete editor session, too.
Is there a way to re-define the script so it has only effect in the screen itself and not in the editor part?
Best regards and many thanks,
Joerg
this is a great script.
My problem with it is that whenputting it into "onApplicationStart" it is active in the complete editor session, too.
Is there a way to re-define the script so it has only effect in the screen itself and not in the editor part?
Best regards and many thanks,
Joerg
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Wheel mouse emulation for Subfile
Hi Joerg,
Thanks for your kindly comment! It will probably be solved by my first post. It said coding into onArrive/onLeave properties. I'm not 100% sure what "it is active in the complete editor session" means, though, it would not happen if the screen is "locked".
HTH
Best Regards,
Hidekazu Tanaka
Thanks for your kindly comment! It will probably be solved by my first post. It said coding into onArrive/onLeave properties. I'm not 100% sure what "it is active in the complete editor session" means, though, it would not happen if the screen is "locked".
HTH
Best Regards,
Hidekazu Tanaka