StrokesPlus.net Forum
»
General Discussion
»
Feature Requests
»
keyboard/mouse/message hooks and stronger plugin support.
Rank: Advanced Member
Groups: Translators, Moderators, Approved Joined: 4/6/2020(UTC) Posts: 79 Thanks: 1 times Was thanked: 21 time(s) in 21 post(s)
|
It is more efficient and stable to get infos via hook, not timers; control the input via hook, not 'consume' & sendkey. Considering script is significantly slower for hooks, S+ would use the plugin directly via managed codes. For example, the plugin can subscribe an event raised in hook procedures. Furthermore, actions and hotkeys could have events as well.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
Quote:control the input via hook, not 'consume' & sendkey The problem with this is that low level hooks have to be processed and returned to Windows as fast as possible. If the hook call does not return quickly enough, Windows will evict (remove) the hook, taking it out of the call chain without notifying the application (S+). Opening it up to plug-ins could result in Windows evicting the hook(s); an event subscription model really is not ideal for this scenario. Plus, people writing poor plug-ins or simply having too many plug-ins subscribing to the events could lead to delays, again causing Windows to evict the hook(s). Not only that, poorly written plug-ins could impact the amount of interference of mouse/keyboard input to the point where the user can tell mouse/keyboard events have a slight delay as the plug-in(s) are processing each event (there are a LOT of hook events/messages). Now, an asynchronous subscription model would be fine, but you would not be able to control the return value of the hook calls made by Windows - it would be notify only, unable to prevent the event from being passed along to the OS/applications.
|
|
|
|
Rank: Advanced Member
Groups: Translators, Moderators, Approved Joined: 4/6/2020(UTC) Posts: 79 Thanks: 1 times Was thanked: 21 time(s) in 21 post(s)
|
I see. Notify only is also great. And how about hotkeys?
|
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
Feature Requests
»
keyboard/mouse/message hooks and stronger plugin support.
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close