Saturday, June 7, 2014

Virtual touchpad for touchscreen (AKA MMB for a touchscreen part 2)

Only yesterday I was complaining about the rather poor mouse emulation and gestures offered by Windows 8.

For a Windows 8 touchscreen, it seems a middle mouse button (MMB) click has a much more elegant solution: TouchMousePointer.

This adds a new button to the taskbar that allows for a whole host of new mouse-like functionality for your touchscreen:

1) You can create an onscreen touchpad or turn the WHOLE screen into a touchpad (this is very useful for applications/games that are not optimized for touch, for which the precision of a mouse is necessary.
2) You can use the screen similar to a normal touchscreen*, but a click is only initiated when you put a second finger down (to the left for a left click, to the right for a right click, or 3 fingers for a middle click; this does mean you'll be using your middle finger for operating the device, but its not a huge change)

I had a play with option (1) above, along with StrokesPlus to try and make some action games like Skyrim playable (I did have better things to do.. But damn it). It kind of worked: A three finger swipe up to start walking forwards, a swipe back to start walking backwards etc. Using the screen as a touchpad instead of a touchscreen certainly made navigation much easier, however frankly having to use a gesture to move around feels pretty clunky compared to on screen controls. That said, there is a program called VirtualPad by PalmTime, which might make things much easier.

I've spent far too much time on this... In part a tribute to how poorly the interface is implemented in Windows 8**, and in part to the fact probably noone imagined these kinds of games would be used on a touchscreen.

*Presently, the author appears to be calling this "relative" mode, whereas it should probably be "absolute" mode since the mouse moves relative to the absolute position of your finger, not itself... But English aside, everything is very nicely implemented.

** At least as far as MMB is concerned, I mean how hard can it be? My touchscreen allows 5-point touch, and yet Windows doesn't actually utilise that ability.

Friday, June 6, 2014

Custom gestures in Windows 8 (AKA middle mouse button on a touch screen)

Another departure from all things Japanese, today I want to give a shout out to the people at StrokesPlus for their free gesture program. Why? Because customization of gestures on Windows 8 is terrible, despite the limitation that loss of a keyboard and mouse has on a windows environment. Yes, you can use Metro apps, but frankly that isn't why people buy a Windows machine. Custom gestures are a valuable tool for making up for the lack of peripherals essential to many programs past and present.

Doing a Google search for "custom gestures in Windows 8" brings forth a wall of results about the Windows 8 default gestures*, which is punctuated by the odd reference to "TouchMe Gesture Studio" a piece of "free" software that requires you to pay out for the "gesture engine" that actually allows the program to function. Ahhh, how I miss the old days when "free" used to actually mean just that. Anyway, anyone who has read this blog knows I'm a miser when it comes to supporting apps where a free alternative exists (Aedict3 being the notable exception**).

StrokesPlus is free, which is great. It perhaps loses out on some functionality against its rivals in that it isn't really built specifically for touch, but for mice, and so there is no multi-gesturing. However, it remains powerful: after all, we're all so used to using pen & paper, that we're generally comfortable with one finger on the screen. I suspect our brains are also more used to memorizing single-touch gestures in the same way it takes time to learn to use both hands on a piano etc. but that is just my speculation, and certainly multi-gesture might be more elegant.

My particular use for StrokesPlus was to allow middle-mouse button clicks*** without having to plug in a mouse. It only took a short while to work out how to implement this in the StrokesPlus framework (some scripting experience is handy here, but not necessary as everything is annotated). And now I can initiate the gesture with the RMB (long-touch from the Win8 default), and drag a simple symbol which I assigned to the middle mouse button (MMB) down*4*. I then assigned a simple click with a modifier for the MMB held down to call the middle mouse button up *5*. This way I can drag the MMB after making my gesture, then just long-touch the screen again to stop using the MMB. If I wanted to I could have just done a single MMB click using the following function: acMouseClick(gsx, gsy, 1, 1, 1), which sends both the down and up command, but I wanted to be able to drag with the MMB too. This explanation is probably a bit cryptic, but once you've downloaded StrokesPlus and played with it for a minute or two, it should be pretty clear.

In summary, StrokesPlus adds some useful functionality and customization, and while by no means fills the gap entirely, it does help bridge the gap between tablet and PC functionality.

*and frankly, who isn't frustrated by these stupid gestures? In desktop mode I have no need for the charm menu, and since Metro apps now appear in the taskbar, I have no need for the app switcher when I'm in desktop mode. Generally what happens is that I'll accidentally activate one of these stupid gestures while trying to type on the onscreen keyboard, something I never have to worry about on Android. Then again, Android can't run 99% of my games.

** I say that, but to be honest, I've yet to see a free alternative that can do half of what Aedict3 can do.

*** The game Tropico 3 requires a middle mouse button or keyboard to rotate the camera around, a bit frustrating if you don't have a mouse!

*4* in StrokesPlus speak: acMouseClick(gsx, gsy, 1, 1, 0)  -- with no modifiers
*5* that is to say: acMouseClick(gsx, gsy, 1, 0, 1)