Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[Q] Hiding the mouse pointer.

$
0
0
I have one of those Android HDMI TV sticks (A variant of CX-01, to be exact.) running 4.0.4, successfully rooted and hacked up to my liking. There is one thing I would like it to do, which, in my case, is the reason to own it in the first place: I need a very portable presentation device, which I could plug into anything with a HDMI socket and play a presentation. (As a side note, it boots whenever it gets power supplied, so you can use it as a very hidden cheap web server - it's smaller than a Raspberry Pi.)

There is a problem with this usage, however. The device comes with a 2.4 GHz wireless accelerometer-based mouse with a few buttons, which is it's only input device, connected over USB OTG. (Replacing it with something else would be very much not cost-effective) That mouse is only usable because when it is connected, ICS displays a mouse pointer on screen, otherwise, navigation would be way too cumbersome. I have replaced the stock mouse pointer with a smaller one by replacing the png image in framework-res.apk, and it's good enough. Using Hide Bar, I was able to hide the status bar (the wireless mouse has back and home buttons) so I get the full screen for my presentation.

During the presentation itself, I need an input device to move between individual slides and otherwise trigger execution, buttons on the wireless mouse work, or can be reassigned in various ways. However, I need the mouse pointer to invisible during that, as the motion sensitive wireless mouse would make it move constantly while I'm talking with the mouse in my hand.

There is apparently no way to temporarily disable the accelerometer in the mouse itself, while it has a power button that disables it entirely, it turns off everything, including the buttons, and pressing the buttons enables the mouse again.

This means I need a software means to temporarily hide or disable the mouse pointer. (I can obviously permanently hide it by replacing the pointer with a transparent PNG. That would make it very hard to control the device, because the only button it has to trigger a control actually simulates a left click, so it's out.) Extensive googling failed to provide an answer -- most of the time people who get a mouse pointer they don't want seem to eventually give up and pick a HID device which does not produce it instead. As far as I can see, there can only be two ways to do it:
  • Somehow get the OS to think it has no mouse HID device, or that it's not moving.
  • Somehow force the mouse pointer to stick to a corner of the screen and keep it there while it's not needed.

Unfortunately I could find no clear sources on either method. I'm not above some hacking and programming to get it done, but I would appreciate an advice on what to look for.

Viewing all articles
Browse latest Browse all 3614

Trending Articles