I'm using the Xtst extentsion to type and do stuff using the mouse
I have not encoutnered any problems untill I started using xtst to move and click the mouse.
for example, here's a set of action:
move 359,216 & click (XTestFakeMotionEvent(display,-1,359,216,0);)
move 378,213 & click
move 376,391 & click
type amousa1990#gmail.com, adel_ahmed#something.com (the string is broken down into characters and then XTestFakeKeyEvent(display, keycode, True, 0); this code has been working fine for the past couple of months, til I started using mouse movements and clicks
move 438,727 & click
plenty of other clicks
what happens is all mouse movements work fine, the typing events are not sent/synced
unless I use usleep of:
100 before each letter typed
500 before each click
700000 before each mouse movements
mouse movement usleeps are slowing down the app severely
the code is as follows for mouse movement:
XFlush(display);
usleep(700000);
XTestFakeMotionEvent(display,-1,x_coordinate,y_coordinate,0);
XFlush(display);
XCloseDisplay(display);
should I keep the display open and use a pointer instead(I'm calling these functions within a function)
should I flush more/less often
thanks
I think keyboard Auto repeat settings in your desktop environment, may have an impact on the behaviour of the program
Related
I have a web page, when I click one button(by both using mouse click or using keyboard with tab and press), it will show some items, normally, it works perfect.
However, if I
1> open windows magnifier with 200%,
AND
2> use keyboard with tab and press
to trigger the button,
the items still shows correctly,
but the whole page moves back and forth in horizon automatically until I move mmouse or press any key.
++++++
I got the root cause:
As I input the follow code
document.addEventListener('focus',
function()
{ console.log('focused: ', document.activeElement)
},
true);
in console to monitor the focused element,
it shows the focus are switch between two elements,
however, I try to set the two element with tabindex = 0 or -1,
and all the 4 combinations,
but it doesn't work.
Are you using "docked", "full screen", or "lens" view for the magnifier?
I'm guessing "full screen" because in that mode, as you tab through a page, the magnifier will try to keep the keyboard focus within view. You might have an issue where your focus is moving between two elements that both can't be displayed in the magnifier at the same time. Usually it will just move the magnifier to the element that has focus.
I'd suggest trying "Docked" and "Lens" view first to see if you still have an issue.
I've made a Node/AutoHotKey script to control two computers with one mouse. I've made the cursor disappear on the first computer when using the second computer (https://www.autohotkey.com/boards/viewtopic.php?t=6167), but the mouseover event is still firing of course.
What I mean is simply if you hover over some icons on the desktop you will see tooltips, and so on.
I'm using a graphics tablet (absolute positioning), the cursor position gets captured and sent to the second computer.
I've found this method:
Found it here: https://www.autohotkey.com/boards/viewtopic.php?t=33128 (Also from the documentation: https://www.autohotkey.com/docs/commands/BlockInput.htm)
BlockInput, MouseMove ;to disable mouse interaction
BlockInPut, MouseMoveOff ;to enable mouse interaction
But it blocks mousemove completely, so that the cursor stops moving at all.
Is there any way to programmatically disable/enable mouseover (so that buttons don't change their color and tooltips don't appear, but AutoHotKey could still capture cursor position) event globally on Windows without blocking mousemove?
So i run mousekeys using the same command every time:
xkbset ma 60 10 10 5 2
yet every time i strike / or -, mousekey's start glitching.
The glitch is:
when i use the numpad to move my mouse, instead of moving fluently, it starts to jump down. For example before i strike the / and - keys the numpad moves the mouse smoothly only several pixels at a time... when i strike any of those two keys, then the mouse pointer starts to move around 100 pixels.
Update
I now notice that when i have my universal access screen open, when i hit either of the two buttons, the mouse keys on/off switch turns to on. I feel as if this was the problem... is there a way to prevent that?
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.
The game I'm designing currently requires a first person controller and luckily Three.js offers that class as well.
However I can't stop the camera from flying around. I know that the mouse movement causes the fly because it happens as soon as I move the mouse. But reading the js code,I cant find the attribue which causes this movement. Here is how I initiate the controls:
controls = new THREE.FirstPersonControls(camera);
controls.movementSpeed = 0.1;
controls.lookSpeed = 0.001;
controls.lookVertical = true;
I do not want the view direction to change when I am not moving the mouse.
any idea ?
Keep in mind that the FPS style mouse movement in webGL is usable rather only in a full screen mode. If an application runs in a standard windowed mode, the cursor is visible, and the application can not detect cursor movements that cross the edge of the window. This makes it impossible to look around in the FPS style (look movement stops when the cursors reaches the window edge).
This is probably the main reason why a PointerLockControls demo asks you to switch to the full screen mode.
With FirstPersonControls the look movement continues when the mouse reaches the edge. Such approach works well in the windowed mode.
You might want to use the PointerLockControls instead
See an example here:
https://github.com/mrdoob/three.js/blob/master/examples/misc_controls_pointerlock.html