Wiimote on PC with GlovePIE and Wiinremote - scripting

First off, I hope this is the right place to post this. I am new, and Stack Exchange was the first site I thought of for this question. After reading the "How to Ask" page here, I don't see a better place. Let me know if I'm missing something and there's a place more suited for this question.
My question here, with background info below: Does anyone know how to use only pitch and roll for a mouse in GlovePIE, without yaw and IR?
Background: basically, I want to use my wiimote for mouse + WASD for PC gaming, but I cannot use an IR sensor bar. (I am CADding around the wiimote for a project and this material will end up obstructing the signal.) I have at my disposal: an RVL-036 wiimote and a broadcomm bluetooth dongle with a hacked Toshiba stack, a used RVL-003 wiimote I bought when the 036 didn't pan out, Wiinremote, and GlovePIE.
GlovePIE doesn't work with the 036 wiimote, and neither does Wiinremote even though I expected it to. With the 003, Wiinremote gives me perfect mouse movement using pitch and roll (I hear yaw needs an IR sensor). The problem is: I can set keys in Wiinremote such as Up on the D-pad to W on the keyboard, Left to A, and Down to S, but they only work in web browsers and such and not in-game.
My focus is now on GlovePIE scripts because I hear it does a good job in-game getting wiimote buttons to act as keyboard keys. (I first tried lednerg's motionplus script, but obviously I get "motion plus NOT DETECTED" in the debug field. I can click with the script running, but I just can't pan the cursor around.) I have looked around for mouse scripts so that I can add my own WASD key assignments, but every script I have found uses an IR sensor bar. I know it must be possible to use only roll and pitch for a mouse in GlovePIE--because Wiinremote handles it beautifully--but I have unsuccessfully tried looking for wii-specific GlovePIE tutorials and I don't understand the general syntax or how to call on the wiimote in GlovePIE.
I basically want to do exactly what Wiinremote does but in GlovePIE in the hopes of getting keys to work in-game.
My question: does anyone know how to use only pitch and roll for a mouse or know how I can familiarize myself with GlovePIE's language to do it myself?
Thanks.

Thanks, nwk and Tim. I posted on Super User. But I think I just answered my own question anyway. I found a stupidly simple solution: run GlovePIE and Wiinremote simultaneously, GlovePIE for buttons and Wiinremote for the mouse. facepalm
GlovePIE's syntax seems simple enough from others' button assignment scripts, as long as I stay away from mouse scripting.

Related

Prevent application from warping/moving the mouse/cursor

My issue is KiCad related however it applies to other programs as well.
In KiCad under the schematics editor if you right click, move the mouse and then left-click the cursor will be placed back where you first right-clicked.
According to some answers (see launchpad below) this is not a bug it's a feature, so the developers are reluctant to make it an optional feature. There is a similar feature concerning warping the mouse when zooming in, which is optional.
My question is therefore if it is possible to block certain programs from moving the mouse cursor? i.e.
$ kicad --mousewarp=0
I have seen several requests for this on forums and as bug requests on launchpad:
https://forum.kicad.info/t/mouse-jumping-feature-removal/7077
https://bugs.launchpad.net/kicad/+bug/816739
Also a video on the issue at youtube:
https://www.youtube.com/watch?v=VtpipzDhyBY
An interesting observation is that if you select OpenGL in the pcb editor, the mouse does not warp, but there is no such alternative in the schematic editor.
Short answer: No.
The application sets the mouse cursor based on its needs. While this is annoying in the case you mention, it can be useful in others.
Long answer: Yes, but you may need to create your own input driver and ignore the XWarpPointer() calls.

How to automate mouse movement and keyboard strokes?

I need to copy and paste some stuff. I was thinking the easiest way was to record my mouse movement (and maybe keyboard) and then just repeating that. Is this the most efficent solution for me? I have no automated software experience whatsoever.
I was thinking about using this : http://www.autohotkey.com/board/topic/59817-mouse-movement-click-recorder/, but it doesn't record the keyboard. This task is time-sensitive, so that's why I need it to be beginner friendly (because I have no experience).
Quick googling found out few tools:
Mouse Recorder Pro
Mini Mouse Macro
Both look like what you need. I'm sure you're able to find more tools.

How would you test a mouse? Describing as many test cases as possible?

A question that I have been asked by a professor? Not looking for someone to give me a direct answer but more an idea of how to answer as im quite confused by the Question?
Thanks
Assuming you're talking about the common Computer Pointing Device, not the rodent:
Imagine grabbing a brand new mouse hot off the factory assembly line. You want to test this sample mouse to make sure it functions correctly to the full satisfaction/expectation of whoever's grandma is gonna buy it.
How exactly would you test it? After doing what exactly would you conclude with 100% confidence that "OK, this mouse is perfectly good, no problems at all in any situation!" ?
You might plug it into a computer and see; does it get detected right away? Does it automatically setup the driver? Does it move around well? Does it click well? What if you're using Windows XP? What about Linux? What about inside virtual machines? What about with a USB extension wire? All of these "What If"s are called test cases; cases / situations that you'd want to test for to make sure the mouse works as expected even in that case / situation.
You can also test through..
1) which is the manufacturer company of that mouse
2) Is it required mouse pad ?
3) Is it wired/wireless mouse
4) maximum distance between mouse & device(Wireless mouse)
5) you can also check that "mouse can connect with more than one device same time.."
6) apple's mouse doesn't work in windows device...

vb.net Display/Focus/Show Form on top of PC Game

What I am trying to accomplish is this: I want to be able to press the F5 key on my keyboard, while playing a PC game, to show (bring forward, focus, etc.) my program. My 3 attempts so far have failed. Any idea on how I could accomplish my goal? Similar posts on other forums say to set the form's key preview to true and use on keyPress... which failed.
Thank you,
Anonymous
Here is the question about capturing global mouse / keyboard, you can try using it in VB.NET and test it, though I guess you only don't want to be caught while playing games during work. ;)
Also I definitely suggest this link from it. :)

How does "Cinch App" do it?

If you aren't familiar with Cinch, its an application on Mac App Store that allows you to resize ANY window to half/full screen size if you drag the window to the edge of the screen. Exactly like the functionality in windows 7.
Now my question is, how is it done? I have looked all over cocoa apis looking for notifications/delegate methods for whenever a window is being dragged (ALL windows, not just windows owned by the app from which code is running from) but can't find it. Looked in Core Graphics API...Quartz Display Services....but can't find it.
Any help will be greatly appreciated as I have been looking for the past week....Thanks!
Edit: Resize the window is easy since it can be done through applescript bridge..
Are you developer behind i-Snap or some other Mac App Store clone of Cinch?
I'm the developer behind Cinch, and while I try to maintain an "abundance mentality" which basically says "There's enough out there for everyone", I've been upset by the Mac App Store lowering the barrier for entry to this market which has produced a number of half-backed competitors.
I would be thrilled to see some real innovation around the work I have done, and not just clones looking to make a quick buck.
Anyway, you want to look at the Accessibility APIs. It's a Carbon C API. This is probably your best reference: http://developer.apple.com/library/mac/#samplecode/UIElementInspector/Introduction/Intro.html%23//apple_ref/doc/uid/DTS10000728
I've not used the Cinch app, but if I were to do this I'd expect to be using cocoa events. (Also see here) Specifically the mouse handling events, combined with where the mouse is currently on-screen. They probably set a variable when a window is grabbed and then track the mouse pointer until it hits an edge or until they release the mouse button.
Events are very powerful and provide very low level access to what is happening, but can also be very complex. Good luck!
I'm not sure. Maybe the developers combine apple script and carbon events. You can create carbon events to know when the mouse has been clicked or dragged