I have been trying to play Omikron: The Nomad Soul, but I found it incredibly difficult to do so without using the mouse. I have been trying to use dinput.dll to simulate keyboard presses using mouse movement, but nothing I tried so far worked. I am a complete amateur at this, so I thought I should ask how to do this properly.
What I am trying to do is to edit dinput.dll source code from github, create a dinput.dll file with configurable ini file, where you can assign key presses to mouse movement. This would be beneficial in many old games.
For example;
Mouse moving up = press up arrow key
Mouse moving down = press down arrow key
Mouse moving left = press left arrow key
Mouse moving right = press right arrow key
Reason why I want to use dinput instead of something like autohotkey is because stuff like autohotkey doesn't always get along well with old games. For example Omikron: The Nomad Soul.
Thank you for any help in advance.
Related
My platform is Linux, and there is a shortcut Alt + Left Shift + Num Lock to enable mouse keys TEMPORARILY. They say this feature is provided by X server, so it can be used on all desktop environments based on X. The problem is that the effect doesn't last long. The keypad will switch back to normal keypad automatically, and cannot be used to emulate a mouse. Therefore, whenever I want to move the cursor, the result may become scrolling to the bottom of the current document, which is annoying. Is there any way to prevent X from switching the keypad back to its original keypad function automatically? Thanks.
I want to emulate a mouse, that just moves around and left clicks while doing so.
I tried using RobotJS(https://www.npmjs.com/package/robotjs) but it didn't work out for me, so I'm looking for an alternative.
I love the mod4 + mouse-drag combo for moving/resizing windows in Awesome WM, it's very intuitive with regular mouse. Now that I'm using Awesome WM on my laptop, however, I find this combo more annoying when using the touchpad vs regular mouse.
The problem stems from the fact that I now need 3 fingers to perform a gesture that I could do with 2 before (1 to move on the touchpad, 1 to keep on the left-click at all times, and one on mod4). Alternatively, I can apply more force to the touchpad and have it pressed as I drag my finger, which is not any better since it puts a lot of stress on the finger doing the dragging).
What I would like to do instead is have awesome treat left-mouse button as pressed if both of the following conditions are met:
mod4 is pressed
movement event is coming from touchpad and not regular mouse
To do so, however, I need to be able to detect that the movement is coming from the touchpad. Is there a way to do so in Awesome WM/Linux? I've looked through the keysyms (http://wiki.linuxquestions.org/wiki/List_of_keysyms) but don't see anything for the mouse. I've also looked at the mouse.lua file in Awesome WM but it doesn't seem to have anything to differentiate between the two either (https://github.com/awesomeWM/awesome/blob/master/lib/awful/mouse/init.lua). If there is a way to tell that the last coordinate change came from a touchpad on Linux that would resolve the issue as I could simply create a lua file to run such check whenever Mod4 is pressed.
To do so, however, I need to be able to detect that the movement is coming from the touchpad. Is there a way to do so in Awesome WM/Linux?
Nope, there is no such way in AwesomeWM. Sorry.
In X11, this is possible via the input extension. However, awesome does not use that extension.
I'a currently working on a small utility, it's my first ever X project. The utility is used to draw a small circle around your mouse pointer. I use an app called Pinpoint to do the same on my Mac, it helps me find my mouse as I'm visually impaired.
The utility creates an transparent X window and draw a circle inside, it then moves that window with the mouse pointer so that the circle follows the mouse.
It currently works, except for one detail. Mouse events are not propagated up to the underlying windows. Basically, the utility makes the mouse useless.
As far as I can tell from the Xlib docs, if not otherwise specified, new windows should propagate all events. How can I fix this?
The code can be found on GitHub: https://github.com/blubber/circle-cursor it's a bit messy currently, becaue it is just a proof of concept.
I would suggest doing via cursor image as well, there are many ways when you won't be able to receive mouse events and only possible source would be polling with XQueryPointer.
With xfixes extension you can subscribe to all cursor image changed events and get most recent shape of the cursor, and whit XRender you can set your own ( possibly animated cursor )
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