bzar
A Commando
Pushed a fix for the hanging on device disconnect.
@B-ZaR, I've started a plugin, but wanted to check I'm doing it right.
The code is here, and what I want to happen is when it's activated, it'll create a socket (or maybe pipe, not sure yet). Whilst the overlay program is not active, I want it to let the keypresses through (I assumed I had to create a new virtual keyboard and send them), and if it is active, redirect the keys to the overlay (which I'll probably do using the socket system)
Sounds right and looks too. It's basically just: 1) grab the current input device, 2) create a new uinput device, 3) if overlay is not active, forward all events to the uinput device, 4) if the overlay is active, forward them directly to it.
You might want to keep an eye on which keys are held down though so you can release them automatically when activating the overlay.
Notaz: much of the above is just a matter of making a suitable plugin to handle wrestling everything to its place. If someone specifies what it should exactly do I can probably make it.
I thought the two extra game buttons (I and II) were planned for mouse buttons - at least that's my intention
I think I can help here. This is how it was discussed in the keyboard design threads.I thought the two extra game buttons (I and II) were planned for mouse buttons - at least that's my intention
Nope. Take a look at the image of the Keymat. Those are going to be Insert and Delete.
-God Ginrai
That shouldn't be much of an issue. I'll make a plugin implementing those for a generic gamepad to try it out once I find a few spare hours.Notaz: much of the above is just a matter of making a suitable plugin to handle wrestling everything to its place. If someone specifies what it should exactly do I can probably make it.
Well it would the same stuff pandora currently does - some mouse mode to move the pointer with nubs and a mouse button mode, although I'm not sure about the later, maybe we could use shoulder buttons this time, or something. I guess we'll need ED's input on that. If you want more details on how pandora's driver currently does it I could try to write it down, it's pretty basic stuff though.
Pandora's nubs also have scroll wheel mode, but I don't think anyone uses that so we can leave it out.
Got nub mouse mode with nub-clicks almost done yesterday. One issue I faced was with smooth mouse movement, since with absolute axes like an analog stick you only get an event when it changes. So cursor movement happens only when the stick moves. I try to minimize CPU wakeups by not having a timed polling function in funkeymonkey, so I implemented a thread to handle smooth movement that sleeps when relevant nubs are inside the configured dead zone. This way the plugin should use just about no CPU when idle (save for some rare timeout checks for the input device). I'm using the input event codes a WiiU Pro pad causes, but if Pyra's are different from those it's not hard to change.
Mouse controls cursor position, nubs control cursor velocity.
As you move a mouse, every quantum of movement gets its own event. As long as the mouse moves the cursor should as well. When you stop the mouse, the cursor should too.
As you move an analog nub, every quantum of change in its position gets its own event. As long as the nub position changes, the velocity of the cursor should as well. When you stop moving the nub, the cursor should keep moving to the direction the nub is being held at. There's no further events to move the cursor with until the nub is moved again.