[Q] Hiding the mouse pointer. - Android Software/Hacking General [Developers Only]

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.

Related

Changing the screen size when connected via hdmi?

When i plug in my transformer into my tv how do i change the size of the screen? The home buttons are cut off so its impossible to use it with my bluetooth keyboard and mouse
Sent from my revolver!
you can't as far as I know of. oh, and did you know that many buttons on the keyboard and mouse can replace the android ones
for example:
both right clicking the mouse and pressing escape on the keyboard count as a back key
the "windows" or super button on your keyboard (or control on an apple keyboard, I think) will bring you back home
as for the menu button, I remember it being somewhere on the keyboard, but I don't remember where right now (if I find out, I'll update you on it)
as far as other things such as the clock and battery, you might be better off getting a longer hdmi cord and proping up the transformer on a table somewhere in sight so you can read the battery gauge and time from that. otherwise, good luck with your setup
(try control, alt, or any one of the function keys and then try insert because I am like 90% sure it's one of those)
This is not something you can change on the transformer, but on your tv there should be adjustments that you can make to fit the image. For instance on an LG that i have in my room there is an option to change the aspect ratio of the display, and one of those is to manually adjust it. Same thing on the Samsungs we've got also.
Sent from my Transformer TF101 using Tapatalk
i have the same problem..tried 3 tv but still happen..films all ok,but when i am in homecsreen the status bar and the top of the screen are cutted.....i tried also change kernel,hdmi cable,hdmi to mini-hdmi converter but nothin'....anyone who can help me?

Function keys and scroll direction

So, I'm loving the hell out of my Surface RT (64GB with black Touch cover) except for two things.
1: I use the actual function keys (F1-F12) a lot more than I need a shortcut key for the play/pause button or the Share charm. Due to the placement of the Fn button on the right side of the keyboard, it's difficult to use the keys the way I'm used to. For example, Alt+F4 is now Alt+Fn+Play/Pause, and requires two hands. If anybody can find a way to toggle the default state of the Fn key, I would be super-grateful! Ideally, I'd be able to actually remap he keys like you can on advanced USB keyboards; for example, I need the Home and End keys too, but rarely use F8-F10 so I'd like to remap those.
2: The default direction of the multitouch scroll drives me up a wall (but only if I try to drive down it). It's a pointing device, not a touchscreen, dammit! I expect it to function like a scroll wheel on a mouse, or the side-scroll on older PC touchpads, or the TrackPoint scroll on the Thinkpad, or... you get my point. Yes, I get that Apple did it first; they were dumb then, are still dumb now, and MS was very dumb to copy them. On the other hand, at least Apple lets you change it! If the direction of this scroll can be reversed (preferably without screwing up the scroll wheel of an actual mouse, if I were to connect one), that would be amazing.
I was really hoping that the included drivers would include controls for these things, the way Microsoft's normal mice and keyboards come with highly configurable drivers, or most Laptops come with fairly advanced Synaptics touchpad driver controls. If any of you have contacts at MS on or near the Surface team, tell them that we really want some drivers like those, please!
have you been able to resolve the Fn key issue?
GoodDayToDie said:
So, I'm loving the hell out of my Surface RT (64GB with black Touch cover) except for two things.
1: I use the actual function keys (F1-F12) a lot more than I need a shortcut key for the play/pause button or the Share charm. Due to the placement of the Fn button on the right side of the keyboard, it's difficult to use the keys the way I'm used to. For example, Alt+F4 is now Alt+Fn+Play/Pause, and requires two hands. If anybody can find a way to toggle the default state of the Fn key, I would be super-grateful! Ideally, I'd be able to actually remap he keys like you can on advanced USB keyboards; for example, I need the Home and End keys too, but rarely use F8-F10 so I'd like to remap those.
2: The default direction of the multitouch scroll drives me up a wall (but only if I try to drive down it). It's a pointing device, not a touchscreen, dammit! I expect it to function like a scroll wheel on a mouse, or the side-scroll on older PC touchpads, or the TrackPoint scroll on the Thinkpad, or... you get my point. Yes, I get that Apple did it first; they were dumb then, are still dumb now, and MS was very dumb to copy them. On the other hand, at least Apple lets you change it! If the direction of this scroll can be reversed (preferably without screwing up the scroll wheel of an actual mouse, if I were to connect one), that would be amazing.
I was really hoping that the included drivers would include controls for these things, the way Microsoft's normal mice and keyboards come with highly configurable drivers, or most Laptops come with fairly advanced Synaptics touchpad driver controls. If any of you have contacts at MS on or near the Surface team, tell them that we really want some drivers like those, please!
Click to expand...
Click to collapse
The Fn Key issue is a little bit annoying, anybody have a solution for it?

Dosbox Turbo mouse trouble

I setup Daggerfall with mouse set to physical and have tried both relative and absolute and in game mouse look turned on, the problem is that i can only turn about 90 degree from left to right. When the android cursor hits the edge of the screen i can no longer turn. Any suggestions on how to fix this would be much appreciated.
you are not alone...
Babalonis said:
I setup Daggerfall with mouse set to physical and have tried both relative and absolute and in game mouse look turned on, the problem is that i can only turn about 90 degree from left to right. When the android cursor hits the edge of the screen i can no longer turn. Any suggestions on how to fix this would be much appreciated.
Click to expand...
Click to collapse
I have the same issue with my nexus7 and I think that most other devices will have it too... Obviously, this problem isn't specific just for daggerfall - since the android mouse pointer won't leave the screen, you can't turn in any 3D game (or scroll in strategy games... etc.).
To my knowledge, there is no way to disable android mouse pointer and I have read that google forbids apps to disable it too. I use a simple workaround which is to set the mouse pointer speed in android settings to minimum - than the mouse in dosbox moves a lot faster that the android mouse.
It won't solve the problem completely, but it makes the games playable - you still need to be careful not to hit the edge of the screen with android mouse pointer, but you can turn about 720 degrees in one direction before that happends (than you just move the cursor back to the center of the screen and continue playing...)
Unfortunately, I think that the only way to get rid of the android mouse pointer completely is to flash a custom rom which doesn't have mouse support built in at all (but of course than you couldn't use the mouse anymore - except for gaming in dosbox...)
it is ok
karyk said:
I have the same issue with my nexus7 and I think that most other devices will have it too... Obviously, this problem isn't specific just for daggerfall - since the android mouse pointer won't leave the screen, you can't turn in any 3D game (or scroll in strategy games... etc.).
To my knowledge, there is no way to disable android mouse pointer and I have read that google forbids apps to disable it too. I use a simple workaround which is to set the mouse pointer speed in android settings to minimum - than the mouse in dosbox moves a lot faster that the android mouse.
It won't solve the problem completely, but it makes the games playable - you still need to be careful not to hit the edge of the screen with android mouse pointer, but you can turn about 720 degrees in one direction before that happends (than you just move the cursor back to the center of the screen and continue playing...)
Unfortunately, I think that the only way to get rid of the android mouse pointer completely is to flash a custom rom which doesn't have mouse support built in at all (but of course than you couldn't use the mouse anymore - except for gaming in dosbox...)
Click to expand...
Click to collapse
You are correct in that the Android OS does not expose any API's to disable the Android mouse pointer. This becomes a problem in some games, because the Android mouse pointer will not go past the screen edges, thus disabling scrolling when you are using an external mouse (ie. bluetooth mouse or touchpad on the TF101).
There are four possible work-arounds built into dosbox turbo:
1. Screen Scaling Reduction + Absolute Mouse Mode (w/Hardware mouse):
In the settings menu, try reducing the screen scaling to less than 100% (ie. 90 or 95%). This will leave a small black border around the screen. When dosbox Turbo detects that the Android Mouse pointer has entered this black border, it should then emulate the mouse at the 'edge' of the screen. This special work-around will only work in "absolute" mouse mode, as there is no easy way to emulate such behavior in relative mode.
2. Analog GamePad mouse Emulation (w/Hardware Gamepad)
In DosBox Turbo 2.1.7+ analog sticks on gamepads are automapped to mouse and joystick control. So if you plug a Logitech, XBOX, or other supported gamepad into your TF101, the right stick will control the mouse movement, while the left stick will control the joystick.
3. Virtual On-Screen Mouse Emulation (w/Virtual Joystick)
If you go to the setting Virtual Joystick -> Use Joystick as Mouse, then when you enable to virtual onscreen joystick, it will then control the on screen mouse.
4. Touchscreen Mouse (w/Touchscreen)
The final work-around is to go back to the default touchscreen mouse. Using the above screen scale reduction trick + absolute mode will allow for scrolling in games that work with absolute mouse mode. Relative mouse mode is not affected by the scrolling issue.
I'm having an issue while using DOSBox:
I can't play shooters like BLOOD etc. using the right analog stick of the Samsung Gamepad for Android (GP-EI20) which is connected via Bluetooth to my Galaxy Note 3.
Everything else works but the right analog stick is just not being recognized (simply as if there wouldn't be one).
I'd like to use the right analog stick for mouse strafing but don't know how to solve / configure this.
Any suggestions?

[Q] Non-root app for remapping gamepad axes + deadzone?

So I found out that my new Galaxy S3 supports USB-OTG, and gamepads. Well I just so happened to have an old Xbox (original, not 360) controller lying around, so I cut off the xbox connector off the end of the cable, and replaced it with a USB cable (so very easy). It works, sort of. The buttons and dpad all work fine, but getting the analog sticks and triggers needs help from 3rd-party drivers/software.
Specifically, the issues I'm having are:
- There is absolutely no deadzone whatsoever in the Android OS gamepad drivers, so unless the game itself implements a dead zone, this makes mapping axes to functions very difficult. For example, the game Shadowgun: Deadzone, has gamepad support built in, but it requires that you map each individual button and axis; there are no premade configurations. So this means I have to manually map the left analog stick to move, and the right one to look, by tapping on the function, and then moving the appropriate stick. But the problem is that the moment I tap on a function to map it, it is instantly mapped to the trigger axis, because of how noisy/sensitive the trigger axis is, and the fact that there is no deadzone. There is no way around this. It is simply impossible to map any of the axes/buttons because of the lack of a deadzone.
- Some games, however, do come with premade gamepad configurations, so that I don't have to map each function individually. The problem is, these games usually don't allow any custom mapping, and they almost always get the axes wrong. For example, the game Dead Trigger will let you use your gamepad right away, without any options or configuration required. The game maps the left analog stick to move, just fine, but it maps up/down look to up/down on the right stick, and left/right look to the triggers?! And worse yet, the triggers are one combined axis, so this means that I am constantly spinning around in circles like a retarded chicken on a merry-go-round, unless I press and hold both triggers.
So what I need is an app that can A) Force a dead zone on the gamepad, and B) Re-map one axis to another axis.
Anyone know of any Android apps that can do this?
Oh, and they have to work on a non-rooted device, because my S3 is still under warranty, and even though I know I can just unroot it if I need to send it back, I'm still afraid that I might break it while rooted and be unable to unroot it because it is broken.
Thanks for any help!
Did you find a solution to this Problem? I'm having the same issue when using the Ouya Controller with another Android Device.

[Q] Android physical keyboard protocol

Hey all,
I repurposed an old Android 2.3 phone (rooted HTC Wildfire S [marvelc]) as the navigation device for my motorcycle.
My motorcycle has a 4-way handlebar control for the factory navigation (which I don't feel like paying $900 for...)
I'm in the process of debugging the interface of that control on my motorcycle, and eventually I want to interface it to the marvelc via USB.
I was thinking on buying a cheap tablet keyboard and use the wires of that to access the functions that I need (I would need to "scroll" between UI elements, also to "click" on them, and use the "back" button somehow. I don't know if all of these are possible with a physical keyboard or not, but some very old Android devices had controls like this.)
I'm just trying to ask the community, if this option is even feasible?
Also, since I'll need a microcontroller for capturing the input of the 4-way control from the motorcycle, I was thinking on implementing the Android keyboard USB interface on that same microcontroller, but I couldn't find any documentation or protocol description on that. If you could point me in the right direction, I'd greatly appreciate it
Step one: Figure out which keys your nav app responds to.
Does it use arrow keys? volume keys? DPAD?
Use adb and the shell. For example, this sends ESCAPE
Code:
input keyevent 111
You can probably use a gutted keypad and wire up the switches.
It would probably make sense to have it wired for 4 arrow keys and enter.
That way you can test it easily on a desktop system.
If you need keys that are different, edit /system/usr/keylayout/qwerty.kl
Use my UsbMode.apk (in signature) to identify keyevents.
It's designed for something else for the Nook but it will display key events on any Android.
The only problem with gutted keypads is that they use matrix scanning.
If you need/want contacts to ground you'd be better off with a uP.
I like a Teensy 2.0 because it's small and has hardware USB.
This all presumes that your device support USB host mode.

Categories

Resources