I'am using nw.js to create some app. One of my tasks is determine user activity.
Can i use some modules or something to handle mouse move and key press events?
Related
I working on Dialog based applications once i right click on the Dialog Title bar a drop down list is coming with two options 1. Move and 2. Alt+F4 close. Once the User Press Move and he can able to drag the window as he desired and I add the On NC Hits Test to stop dragging its stopping normal dragging but it is not working in this particular context can any body help me in fixing this Bug.
When the user use the keyboard interface, he can move a windows with the arrow keys, without using the mouse.
If you want to limit the position of your dialog, process the WM_MOVING message.
I want to know as to how do you detect if a key press event or a mouse pointer event has been generated by an (automation like) application like xdotool. Basically, I am writing an application to check if there is no real mouse or keyboard activity. In my application I want to flag idle activity only if we don't have real mouse movement or real key press/release on the keyboard. Any reference regarding this would be great. I want to do this using pure xlib API. Don't want to use XCB. Any extensions such XRecord(which I am currently using to capture events) are fine.
Thanks in advance.
Yes there is a possibility.
All X11-events which are relevant for mouse movements and clicks have a member called "send_event".
It is set to "True" if the event was sent by an application. It is "False" if it was generated by the X-Server, i.e. by a user action.
If xdotool uses SendEvent for mousclick simulation than you'll be able to detect that using the "send_event" member.
I'm developing an application for Nokia C2 Mobile and I want to handle the soft keys of the keyboard
Attached an image with the button that I want to handle
I have tried Handle KeyPressed and the keycode that returned when I press this button is 0
please what should I do ?
The button pointed is Right Soft Key (RSK). In that picture, they added commands GoTo, Menu and Names. Just like that, add commands to the form. Type the code to handle that event in command listener.
At the moment, I have code that runs in the Application's SheetBeforeRightClick event, but I've found that this code doesn't run when I press the keyboard's Context Menu key instead of using the right mouse button, which means that I get the wrong menu.
I could use the SheetSelectionChange event instead, but I'd imagine this would be quite error prone. Is there a more elegant way of doing it?
There is a BeforeContextMenu event you can use.
http://msdn.microsoft.com/en-us/library/aa193082(office.11).aspx
It should catch both the right click and the keyboard key.
I am creating application for touch devices for nokia.
J2ME provides methods pointerPressed, released and dragged on canvas.
I have generated a canvas in full screen mode having commands.
On click of "option" command, another command menu opens, which is having commands like Ok, Back, Next.
Now to get the event of sub command menu I have to get that which command is clicked.
My question is how can I get that particular command has been clicked?
Application is for N97/Music express (no keyboard support). I just want the way out using touch functionality.
keyPressed event is not at all useful for me.
If you have pointer events, then look at the co-ordinates of the event, and check to see whether it lies within where you're drawing your menu option on the canvas.