[Q] Mapping a sticky something. - Android Q&A, Help & Troubleshooting

Hi all,
I have just bought a Targus bluetooth presenter for my galaxy tab. It works a treat and was only £5 so I am very happy with it. With a little editing of the key layouts I have been able to get some of the useless buttons to do things like home and menu. It all works perfectly and now I have just one thing I want to do but don't know if it is possible.
I want to map a key to be a sticky mouse down so that I can pan across the screen because it is just about impossible to hold the mouse button down at the same time as moving the track pad. The ideal is to be able to press a key - it locks down - I scroll around as needed then press the same key (or if needed another one) to simulate lifting the mouse button up again.
Is this even possible? If so can anyone point me in the right direction?
Keverso.

Related

Control the location of Soft Buttons

Been seeing a few people talk about the soft buttons getting in the way while using the pen. It's a matter of timing and the pen has to touch the screen before your hand does to keep the buttons from being activated.
However, I did see a review that mentioned something that would be great.
I'm sure that someone could write an app that would control which set of soft buttons would be activated based on rotation. Is this API open within the Flyer so that someone can control them?
In portrait mode I'd actually prefer that the buttons on the left side be active, and in landscape I'd prefer the buttons on the "bottom" of the Flyer be activated - this would be the reverse of the current implementation (actually I'd really prefer to be able to control both independently).
This would solve a few issues. It would prevent users from touching the buttons with their hand while writing, but it would also put the buttons next to your hand while you're holding the device instead of having to move your hand to access the buttons you'd be able to do it with your thumb.
That sounds like a clever idea. I would use that feature if it existed.
It is a fantastic idea, I would pay for it!

[Q] Assigning a hardware button to a touchscreen press?

Hello, I do hope I'm in the correct section. There doesn't seem to be an explicit "Dumb Non-Programmer Questions" area, so if I'm somehow in the bad, my apologies.
Anyway, I was wondering if it it was possible to have an app which reassigned hardware buttons to presses on the touchscreen. So that, whenever you pressed, say, Search, the phone would act as if you pressed area XYZ on the touchscreen.
It originally came to me when I was reading about the Nook Touch, and everyone trying to get support for hardware buttons added. Well, considering most of the ebook readers seem to support taping the side of the page to turn, why not just assign the hardware buttons to one of those areas?
I began researching and found there isn't really anything which does that on Android, or on much anything, really. So I'm more curious then anything now; is it something that just isn't really feasible or possible with the Android SDK, or it is more of a solution in search of a problem that no one's found a reason for?
Lets say you have a button and you want that button to simulate a menu key press you can send key presses via adb and the shell
Runtime.getRuntime().exec(
"adb shell input keyevent 82")
Where 82 is the keycode for the menu key. So i suppose that any hardware key that has a code associated with it could be mapped to a screen press
From something awesome
Er, lemme rephrase the question.
I mean, is it possible to make a hardware button replace a press on the touchscreen? For instance, in the Kindle app, tapping the right third of the screen turns the page. Can I assign the search button, for instance, to replicate my finger tapping the right side of the screen to turn the page?
You can't. But the developers of the application should be able to do this by overriding onKeyDown method (except for the home button which I believe can't be overridden).
Oh bother.
Well, thanks for the replies. I was hoping there might be some method, since it'd make developing for the nook touch easier, but I'm guessing it's not something that's needed more then rarely.
I can't understand why it is so hard or impossible, it is very easy to do on almost every other os. Can't one just assign a button to a mouse click on screen coordinates?
I am asking because it would be awesome, to assign a wii remote button to a mouse click and then play games like Asphalt 6 or so, that don't support hardware keyboard, with a remote controller.
yup, i have the sae question as well. My intention was to play android games which doesn't require accelerometer using wiimote/classic controller.
If you get the app source code or if you are good at smali, you can
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

Voice remote with keyboard

Has anyone tried this remote?https://www.amazon.ca/gp/aw/d/B00U3PFUAC/ref=ox_sc_act_image_1?ie=UTF8&psc=1&smid=A34OAPZOHWTNSP
Does the mic work with Google now? Does the home button take you to launcher home? Can you turn your TV off and change volume,? Cheers
OathYvne said:
Has anyone tried this remote?https://www.amazon.ca/gp/aw/d/B00U3PFUAC/ref=ox_sc_act_image_1?ie=UTF8&psc=1&smid=A34OAPZOHWTNSP
Does the mic work with Google now? Does the home button take you to launcher home? Can you turn your TV off and change volume,? Cheers
Click to expand...
Click to collapse
I've tried a few remotes with a few android boxes I've had and this one is the best I've found. I bought the one called 'Aerb' but you'll see a number of resellers on ebay selling the exact same device. It runs on 2 AAA batteries.
What I really really like is that the four coloured buttons on the bottom AND the big red power button on the
top left are learning/programmable IR blasting, so you can program them to turn your TV on/off, change inputs, increase TV volume etc. using your TV remote. The other buttons are not programmable.
http://www.ebay.ca/itm/161870977156?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT
http://www.amazon.ca/Aerb-Multifunc...&sr=8-2&keywords=usb+wireless+keyboard+remote
This is the best remote by far I have purchased for this box. I am far away from my player right now but I will try and confirm if the mic works with it asap...
saddie22 said:
I've tried a few remotes with a few android boxes I've had and this one is the best I've found. I bought the one called 'Aerb' but you'll see a number of resellers on ebay selling the exact same device. It runs on 2 AAA batteries.
What I really really like is that the four coloured buttons on the bottom AND the big red power button on the
top left are learning/programmable IR blasting, so you can program them to turn your TV on/off, change inputs, increase TV volume etc. using your TV remote. The other buttons are not programmable.
http://www.ebay.ca/itm/161870977156?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT
http://www.amazon.ca/Aerb-Multifunc...&sr=8-2&keywords=usb+wireless+keyboard+remote
This is the best remote by far I have purchased for this box. I am far away from my player right now but I will try and confirm if the mic works with it asap...
Click to expand...
Click to collapse
Does the home button bring you to the home screen ? And by programming the bottom color buttons to change the volume or do the actual volume buttons work? Also its to bad the buttons don't light up . Thanks that would be awesome if you could check the mic . Also are you able to like use the remote underneath a blanket or do you have to point it at the dongle?
OathYvne said:
Does the home button bring you to the home screen ? And by programming the bottom color buttons to change the volume or do the actual volume buttons work? Also its to bad the buttons don't light up . Thanks that would be awesome if you could check the mic . Also are you able to like use the remote underneath a blanket or do you have to point it at the dongle?
Click to expand...
Click to collapse
Does the home button bring you to the home screen?
- yes
And by programming the bottom color buttons to change the volume or do the actual volume buttons work?
- you program the coloured buttons on the bottom using your TV remote, so they will turn the volume on your TV up and down, NOT the vol on the android software.
Also its too bad the buttons don't light up.
- no they do not.
Thanks that would be awesome if you could check the mic .
- *** I cannot seem to get my mic working with voice search. The remote I have purchased has a microphone, but has NO microphone button to enable the mic. There are reports of users who have got their mic working. See here for a picture of a remote with a mic button (the blue one in the bottom right corner) http://forum.kodi.tv/showthread.php?tid=203623
Also are you able to like use the remote underneath a blanket or do you have to point it at the dongle?
- you do NOT have to point the remote at the dongle. It does not work with line of sight like IR remotes. The distance limit is about 15 metres I'd guess. Farther with better batteries
Using the stock ROM, the following keys work:
home button
play/ pause and FF RW buttons
context menu
OK and d-pad button
keyboard letters
Using stock ROM the following keys DO NOT work for me:
soft volume up/down
mute
microphone doesn't work
BACK key doesn't work (this sucks, it registers as a 'right mouse click' under stock rom - doesn't do anything, must use home key instead. it also doesn't work under lollirock either. Luckily under lollirock the soft 'recent apps, home and back' buttons are always visible, so I just use that soft back arrow on the screen.
all of the 'alt keys' on the keyboard - ie the function keys, ! mark etc. These all work fine under lollirock.
I also have a generic android box running full android 5.1 and almost all of the keys on this remote work fully with it, including the hard back key.
Let me know if you've got any other questions!

Shield TV question - any key mapping apps that can be used to remap axis controls?

Hi, I am trying to figure out how to remap axis controls(analog stick, etc.) to keyboard commands or, if that is not possible, where I can find an app to do this for me.
I am doing this for Roblox(android version), since the jump button does not work.
Originally, I tried remapping a controller button to the space bar in a key layout file corresponding to my controller.
This works, but unfortunately it also interrupts the axis input so that jumping while moving becomes impossible - rendering it an unworkable solution(the key code disrupts axis input so that all movement stops - you are only able to jump directly up).
Next, I looked for an app to remap the axis controls(since I cannot figure how to do this with the key layout file, and I want to use the analog sticks for movement).
Unfortunately, while I was able to find an app that will let me remap analog stick to directional(WASD) keys, it(inexplicably) does not provide any option for the analog triggers(R1 and R2 buttons) - again, rendering it an incomplete solution.
So, what I am looking for is either instructions on how to remap axis data(analog stick) in the key layout file(or something similarly accessible to the end user), or knowledge of where I can find an app that will allow me to do this kind of comprehensive remapping.
I have spent literally weeks looking through countless apps and none offer a complete solution.
It continues to boggle my mind how such seemingly simple tasks devolve into Herculean labors when dealing with android.
Any assistance would be much appreciated.
Bump. Anyone?

Android Key Mapping

Hi all,
I am trying to map some keys to play a game named War Robots on my Android Nvidia Shield TV device but I am struggling with one key but only in 'touchscreen mode'. Unfortunately in 'keyboard mode' the game doesn't seem to operate correctly and the robot turns in circles and you have to press the toggle to make it stop turning whereas in touchscreen mode (i.e. unplug the mouse and keyboard) the turning is perfect but I can't map a button on my controller to trigger firing all weapons.
The firing all weapons button when using a keyboard and mouse is mapped to Left Mouse Click or Shift or funnily enough the pipe symbol '|'.
This is what I have done so far:
1. Installed a keymap app on the Shield
2. Mapped all buttons (X and B controller buttons to Space and 'Q' for other special game properties) and have the 'Fire All' button 'Shift' triggered by the 'A' button on the controller.
When I start the game with the keyboard I test this and all mappings work fine and 'A' does seem to 'Fire All' but as soon as I want to go to touchscreen mode (by unplugging the keyboard and mouse) to get the maneuverability working the 'A' controller button no longer does anything although the other mapped buttons do still work on the controller.
So frustrating that touchscreen mode seems to just stop this one button and I have spent hours at this trying the other buttons that had mapped okay to 'Space and'Q' to the 'Fire All' to get around it but had no luck so maybe there is no way. I am not even sure if this touchscreen mode is unique to War Robots to be honest or it is standard Android.
Anyone know in Android touchscreen mode how to trigger a left mouse click or Shift button press maybe or any ideas for a workaround?
Thanks
p.s. this techy stuff might help some gurus on here as to how they do things: developer.android.com/stories/games/war-robots

Categories

Resources