-
-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use system calls? #20
Comments
Please don't make a keylogger @JafarAkhondali 😂 |
@albinekb LOL 😅 Who would create a keyloggger in 2018 using react? 😺 |
I was thinking the same... maybe we need to use a nodejs server for system calls? for example file system could be exposed through a graphql request? |
That wouldn't be part of this package, but another. I'm not familiar with doing this in node so I wouldn't know. |
Hi @kusti8, I'm libui-node author. I gave a look at how you implemented the event loop here: https://github.com/kusti8/proton-native/blob/master/src/eventLoop.js It's similar to how the event loop of libui-node works in early release. As far as I can say, node calls should work just fine (but I didn't try yet). And system calls like logging keys should work too... You could try to use my https://github.com/parro-it/screen-info and see if it work. Anyway these event loop implementation is highly CPU intensive, because it is based on polling (~4% CPU on an inactive, simple window). In later libui-node versions, I implemented a background thread version of some part of the loop that is way more performant, but is actually not working on macOS. And I was not able to find a way to make the same trick work on Windows, that is still using the poor performance polling. |
Yeah I implemented it after I released it because of the macOS error. On my
laptop, I saw only around .4% CPU utilization but I don't know how it is
for others. But that's the best that currently can be done. Node callbacks
should work since it's just an event loop, and it calls refresh on the same
thread.
…On Mon, Feb 19, 2018, 4:53 PM Andrea Parodi ***@***.***> wrote:
Hi @kusti8 <https://github.com/kusti8>, I'm libui-node author. I gave a
look at how you implemented the event loop here:
https://github.com/kusti8/proton-native/blob/master/src/eventLoop.js
It's similar to how the event loop of libui-node works in early release.
As far as I can say, node calls should work just fine (but I didn't try
yet).
And system calls like logging keys should work too... You could try to use
my https://github.com/parro-it/screen-info and see if it work.
Anyway these event loop implementation is highly CPU intensive, because it
is based on polling (~4% CPU on an inactive, simple window).
In later libui-node versions, I implemented a background thread version of
some part of the loop that is way more performant, but is actually not
working on macOS.
And I was not able to find a way to make the same trick work on Windows,
that is still using the poor performance polling.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJW73HGy5_cbHgfZeWgsGFpoUsSRmn2Sks5tWe12gaJpZM4SJrrS>
.
|
I'm thinking of restoring an old version for macOS that should work on last os versions, but involve the use of the an internal, undocumented call I have no solution for Windows yet... but we discussed on libui repos in 2016 and it seems there could be a possible solution.
I agree. |
I think libui, libui-node and proton-native are attractive because they are lite-weight alternative to electron, and so they probably they will be used more often on low-range CPU, where, sadly, the polling-penalty is more heavy. |
Yeah I understand. I don't know enough to work out a cross platform event loop. I would love something that uses native threads, but it's obviously hard to work out. |
I'm closing it as it seems that the OP question has been answered. @parro-it feel free to create a separate issue to track this closer. |
Hi, Is it possible to use system calls using Proton-native? For example log key events when window is not focused.
The text was updated successfully, but these errors were encountered: