Glass Mouse - Glass Q&A

Thanks to jtxdriggers' glass launcher, I have been able to install and launch a number of legacy android apps on my glass. Unfortunately since xe12+ the touchpad no longer allows us to change focus in these apps which makes them pretty limited. Right now I am using a usb Favi keyboard to 'tab' through different elements to regain some control over legacy apps. In most cases this works fairly well.
There are some elements however that are not selectable through tab, and a mouse would be pretty useful. However, all I can get out of the touchpad of my favi is cursor movements. I've also installed synergy, and although the keyboard support works great, again the mouse cursor moves but no clicks ever make it to ui elements.
When I connect through adb and call a getevent -l, I can see that both the favi and synergy create new /dev/input/event# to control the mouse. I can also see left_btn and right_btn down and up events firing as well as scroll wheel events and cursor movement events. This leads me to believe that the drivers for the mouse is installed and working properly.
It appears to me that there is some disconnect between the system events of a mouse click and the UI event listeners. What I don't know is where those two meet up in the system. Any direction or advice from here would be greatly appreciated.

Related

[Q] HP TouchPad Wireless Keyboard Remapping 4 ICS?

I have the Official HP TouchPad Wireless Keyboard and I'm running cm9 0.6
Some keys on the Keyboard are non functional with ICS. For example
Brightness Control
Back and Forward Music
Notification Key
Card View Key (Could be used as home button)
Virtual Keyboard Toggle Key
and some others I cant think of
My point is, how can I make these keys functional to actually work
and
Is there any way someone could probably develop a driver that can be flashed via Clockwork Mod Recovery as a ZIP?
It would be a great help to us TouchPad Users running CM9 ICS
BUMP!
Sent from my Galaxy Nexus using xda premium
I'm actually very curious about this as well, I own the HP touchpad keyboard too and I really like it, it works really well on WebOS but when it came to android, many of the buttons don't work and it would be really great if these buttons could be remapped in some form or another.
Yeah, I would be interested in this too.
Some of the keys are easily fixable by editing /system/usr/keylayout/qwerty.kl - such as the media back/forward buttons. There's a keytest app out there which will capture keystrokes and spit out the numerical codes. You can then edit these codes in together with the desired commands into the kl file.
Other keys (keyboard toggle, brightness toggle etc...), however, do not trigger numerical keycodes at all when pressed; they seem to be using some WebOS specific command, or the Android driver simply is not written to recognise these codes. It looks like the driver would need to be modified for those keys to work - but I am no expert.
I'll try and post an edited kl file with all the keys which are recognised working later.
I have no idea on Android inputs work, but in Linux/X server there was a command line command that allowed you to directly capture keystrokes/events from a keyboard. Does android use X?
Just so you know, this thread will probably get moved, but I thought I would provide a link before it does.
http://forum.xda-developers.com/showthread.php?t=1379863
I havent applied this to CM9, but I would imagine that it shouldn't be too different.
Bump
Bump
Bump
Try using this app:
External Keyboard Helper
https://play.google.com/store/apps/...id.hwkeyboardhelperdemo&feature=search_result
You can use it to remap keys into android. Please report back if it works, as I want to buy a keyboard for my tablet, but dont want to deal with useless keys
I did find this review in the UK that mentions this app does help remap and get those uesless keys working:
http://www.amazon.co.uk/product-reviews/B0058CZX70?pageNumber=2
Quote:
This high quality Bluetooth keyboard measures 28.5cm by 13cm and weighs about 360g, including the two AA batteries that are supplied with it: slightly longer than my tablet is wide, but still small and light enough to carry round.
It is solidly made, matt black metal rather than plastic, with a stylish curving shape firmly supported on rubber feet - no wobble even on slightly uneven surfaces. The slope is perfect for fast typing. The keys are low profile and short-travel, full size, responsive and quiet. No sign that any of them is likey to come loose. There is no numeric keypad, but there is a row of function keys at the top to control the tablet - search, brightness, volume, on/off etc. Battery life is claimed to be about six months as the keyboard powers down when not in use and comes back to life as soon as you press a key.
The keyboard paired with my Sony S and with my Galaxy (both Android devices) without fuss and worked immediately, although three or four key mappings needed adjusting to match the GB layout. For this the External Keyboard Helper app is highly recommended - you just press "autodetect keyboard" and everything comes right.
As other reviewers have mentioned, there is no on/off indicator. The light next to the on/off switch on the underside of the keyboard seems to show that the device is visible for pairing, rather than that it is on. Again, the External Keyboard Helper is useful here because it flashes up a discreet message when a keyboard is not detected. I only found the lack of a light a problem on one occasion - the second time I used it. The batteries supplied were flat, so nothing worked. Fortunately, before hurling it at the wall, I remembered the old principle "check the simplest explanation first".
The lack of a caps lock light I did not find a problem - this probably depends on your style of typing.
Excellent value for money.

Car Installs - Triggering a Tasker Task from Keyboard

Hi,
I am having difficulty getting something I would think easy to work on my Nexus for my car install.
I was wondering how people are getting tasker tasks to be triggered off keyboard hotkeys when using either their Joycon or a standard external keyboard.
It seems from research the way to do this used to be quick launch shortcuts (assigning search key + a letter) to an app or shortcut but it seems these do not work for me in android 4.4?
External keyboard helper lets you launch applications from hotkeys, but seems to give no way of launching tasker tasks.
This is really doing my head in! From youtube it looks like others have no issues doing this. Any help would be greatly appreciated!
Well, the only thing I can think of right now is to use a Tasker Scene with a focused textbox to detect the keys. You will have to run this scene as a dialog, and deal with all the complications with that... (touch disabled outside of dialog, etc) but here's another idea.
You could use a mobile bluetooth keyboard (or any keyboard that has volume/brightness keys) and have a Tasker profile pick up a change in the ringer volume variable, this would give you 2 or 3 hotkeys (vol up, down, or mute). If you don't have a keyboard like that you could edit the Android keymappings under /system/usr/keylayout/General.kl to incorporate volume changes under some key.
Sent from my SCH-I605 using xda app-developers app
Good idea with detecting the variable changes! I'm using an Arduino Micro which emulates a keyboard so I will have no problem emulating them via buttons & changing the keyboard layout kl if nessesary. Thanks
I am currently working on the same topic: Here is my workaround for trigger a task with an external bluetooth keyboard.
create a task in Tasker
create an app of this task with Tasker App Factory
remap a key of the keyboard to the new app with External Keyboard Helper
Finish
Maybe this is helpful
Thomas
What are you trying to accomplish?
Lokifish Marz said:
What are you trying to accomplish?
Click to expand...
Click to collapse
1. With a bluetooth remote (Satechi BT MediaRemote) i want to switch between the homescreen by pushing a key. (launcher nova and tasker secure settings are necessary)
2. a tasker scenes (dialog) with different options should open by pushing another key. Navigation in the scene should do also with the Bluetooth remote (not yet finish).
The goal is an intuitive handling of the tablet ui in the car with less touch-input on the screen. Something like Audi MMI or BMW idrive.
In my opinion to find icon on the homescreen while driving is difficult.
Here is my current set up.
Nexus 7 (In dash)
Center console mounted volume dial with push to mute (Tablet>dial>amp)
(Not shown in the screencap is that the media widget is also in the Navbar and accessed via a softkey in the navbar)
The console dial was initially a USB 5 button mouse with key remapping but required the amp gain be cranked up which caused issues.
Now for full control you need the following;
(Some of these things can be eliminated with voice controls)
Media Control (Previous, Play/Pause, Next, Playlist, etc.)
Directional controls (Up, Down, Left, Right)
Action Controls (Select, Home, Back, Recent, Menu)
Phone Control (Answer, Hangup, Dialpad)
SMS Control (Full KB or voice to text using a noise canceling mic)
If you skip voice control and you don't count the dialpad or KB, you need 15 buttons or adaptive input based on what app is running but still need at least 5-6 buttons. I am not sure how involved implementation of adaptive input would be as I gave up after days of trying to get it just right.
With the Satechi BT MediaRemote, you can cover most of this by key remapping but have to remember what keys are what. The advantage of proper key remapping is that it removes the need for additional apps to get it to work.
Seeing that I'm not sure how complete of a setup you are trying to get, it's hard to offer anymore advice.

Changing nav bar buttons and their functions - is this possible?

Hi, newbie here trying to find out if it’s possible to turn an android phone into a fast desktop type multitasker. Was told I need a combination of AOSP ROM + eXposed, +Tasker +plugins, and a launcher like Lightning Launcher Extreme. so trying to assemble a list of things I’ll need, and find out if it’s even possible or not to achieve these tasks. In priority sequence:
1) Add as many as 15 buttons to nav bar. would love to change the size and more impornt spacing maybe even location of each button.
2) Optional (ability to lock some of the buttons across the board so lets say, on left side I have a locked home and back button, btu the ones on the right I can swipe left or right and move the nav bar buttons just like on Xtended NavBar app , so it’s kind of like a split nav bar.
Is it possible to add specific functions to each nav bar button I create:
3) Three zoom buttons, one with preset zoom %, so I click it once it zooms in to my preset % I click it second time zoom out must be able to preset the % of zoom somewhere. The other two zoom buttons are regular zoom in and out by increments (if possible preset increments as well per each click)
4) Multitask, instead of resent app, where it shows my open apps as smaller windows, I’d rather switch between them in full screen view, so the navbar recent app button must be mapped to simply switch between all open apps in rotation with each click.
5) Copy/ paste/ cut / undo / 4 buttons, not sure if it needs mapping in each app I use or universal, if each app, can it be done in Firefox or any other web browser, and in Microsoft office or any other office program so when I highlight text I can use these buttons, just like they normally would work in desktop versions?
6) 4 arrow keys, this is for Microsoft excel to shift quickly between cells so in each direction. Or as scrolling in web browser in all 4 directions.
7) search button, same concept as copy paste only once I highlight a text this button will search the net for highlighted text not sure if it’s possible to do from office app as well.
8) Now this is a tricky one, is it possible to automate the nav bar buttons, so if I had 10 or more buttons in total, they can’t fit the screen obviously, os once I open a certain app, the nav bar would move left or right depending on my app, so lets say I open an office app, the cut/paste /undo are automatically in front of me, if I open a excel then the arrow keys are in front……and so on
9) Is it also possible to remap volume keys in certain apps, so lets say I open excel, I have space in my nav bar only for 4 arrow keys, so in this case the volume buttons would become copy/paste.
If some could list the ROM, which launcher, specific modules, specific takser plug ins that could accomplish this or some things, well in an optimized way so I’m not running 15 apps for each request, then I will research each one individually.
Sorry for the long post.
Cheers
I have honestly never heard of such things...
And I think (having owned a Note 3 and now a Nexus 5) that the closest you can ever get to such multitasking experience is to own a Galaxy Note 4, with all the S-Pen functionality that's been added so that it'll work like a mouse on a computer. I know this may not add a lot to your cause; it's just what my knowledge offers.
Well for a newbie the confusion comes to me from not understanding the fundamentals of the android, what things are in the core and what things are on top as a layer? So for example if there is a back button on most phones that’s a fundamental core feature, does that mean it will be easy to add a forward button, so this way I’m compromising on my number 4) request and trying to go more a long the lines of android fundamentals.
As for the note 4 if it does add some mouse like functionality it’s only 50% since some things are faster via keyboard shortcuts rather then a mouse.
The problem I see is too many menus, so you select a text even with an s pen you must open a menu then select a copy, then open another app where you want to paste it in a specific location first you must zoom in that means turn the pen away and zoom then turn the pen towards another menu to open so you can select paste… The pen only has one or two buttons so if it has the zoom buttons I can’t paste quickly with a pen, if it has the paste buttons then I need to use my fingers to zoom in again turning my hand back and forth
way too many menus and not very productive way of working in trying to accomplish a small task of coping a text in one app and pasting in another in specific location. As you can see I’m trying to combine both mouse and keyboard shortcuts into one nav bar button this is to overcome the shortcomings of a small size screen and lack of keyboard and mouse of course.
I realize maybe the whole goal of android was never geared towards my way of thinking, but if it’s open source platform and as I see it there are many things that can be changed compared to a more closed system, it’s how difficult to do it only a programmer will understand, a I’m not a programmer. So I’m here trying to get some answers.
Cheers

[Q] Mouse tweaks for emulators

Hello all
Im trying to solve the issue that emulators such as Dos Box, ScummVM, UAE etc have when using a real mouse (plugged in with bluetooth or usb). The 2 main problems are the built in android cursor / pointer being displayed on top of the cursor from the emulator, and the mouse not going past the edge of the screen (for things like turning laying games such as doom).
Would this sort of change be possible by creating an Xposed module? Is so, does anyone have any pointers as to which classes i need to be modifying? Im guessing that the edge wrapping issue will be something in the MotionEvent.java class, but no idea about the pointer icon yet.
My end goal would be to create an easily togglabe solution that allows changing between default mouse behaviour, and a modifed style for emulators.
Thanks
Adam
Made some progress with this so far. Got the cursor hiding working. Ive attached the APK of what ive done so far. It works great for hiding the system pointer within ScummVM. To enable this set the pref and reconnect your mouse (turn off and on again). The cursors seem to only be updated when the mouse is connected to the system.
Does anyone have any ideas how to allow things like DosBox to not get stuck on the edge of the screen mouse wise? This is for things like turning in FPS games etc.
Adam

Keyboard Case - Touchpad Scrolling

So I had bought this tablet at launch, then ended up returning it because of once issue: the scrolling on the touchpad is just emulating a finger swipe, not a mouse wheel. This made it so that I could not scroll when in remote desktop apps, it would just act like I was clicking the left mouse button and dragging.
Has this issue been resolved with any updates?

Categories

Resources