[Q] Xoom and diNovo Mini - which .kl file? - Xoom Accessories

I'm looking into making changes to the .kl file for the diNovo Mini so I can wake my device with a keypress (I'm lazy =P) but there are several .kl files listed (more so than on my TB) and while there are individual files for the Logitech Revue keyboard, Apple Wireless and Motorola Xoom keyboard, there is one that is simply labeled Generic.kl which is listed as "Generic key layout file for full alphabetic US English PC style external keyboards"
I am at work and don't have the diNovo here to test with, so I wondered if anyone else uses the Mini with their Xoom and if they could test to see if they can add the WAKE function to a key and see if it works for them?
I expected another file for the diNovo to have been created when it was connected but maybe it just uses the Generic file, or maybe the one for the Revue keyboard?

If you get this going would love to hear how you do it. Have a mini myself would love to use.

It uses the Generic.kl file. I used a combination of adb logcat and the KeyTest.apk programs to figure out the correct file and key codes to edit in the file to allow the Windows button to wake and unlock the xoom as well as serve as the menu button. Mapped the Home and Back functions as well.
Once I get home I can update with which keys are what and what changes specifically I made to get it to work. When I get home and grab the dinovo mini, it takes just a couple clicks on the pad to get the xoom to recognize it is connected and to start typing.
Switching applications and generally moving about on the home screen is clumsy and somewhat random, but eventually you get there. I can sometimes get the app drawer to open by using the arrow keys in conjunction with ok/enter but there is no highlighting on the icon to indicate it is selected so sometimes you'll open another app or widget instead. Meh, I can typically get into googe voice to text easily and that's all I'm concerned with =)

Any update on this? I've got a diNovo coming and with the mouse support in 3.1 this would be excellent!

Related

Changing Bluetooth keyboard keys

Hello all. I recently got the Bluetooth Motorola Keyboard and I was wondering if anyone would be able to explain how to change any of the hardware keys on the keyboard to open an application. Thanks in advance.
any ideas?/shameless bump
At this time there is no way to change any of the keys. There are people working on this at this time but so far nothing has come out of it. I have the same keyboard but haven't found any need to change anything. What are you trying to do?
I like the keyboard I just wish the messaging button was mapped and be able open the process list (last 5 apps running)
Sent from my Xoom using XDA Premium App
I hope somebody figures something out with this. (I was just Google searching for something on this, found nothing and figured we'd have something here on the subject.) The messaging button for example, does nothing. If it atleast opened Google Talk that would make things easier. Would make my usual Talk/Browser/Gmail switching much easier when using the keyboard.
And being able to change the contacts key to something else wouldn't be awful either. I don't think I've ever used contacts on my Xoom besides looking at it once and noting a pretty interface. So many other apps would be more useful.
I may be able to help with this. Can someone zip and post up your "/system/usr/keylayout" and "/system/usr/keychars" directories and post them up?
You should not have a /data/usr/keychars and /data/usr/keylayout directories, but give me a copy of those as well if they exist!
Still need those files if you will please good sirs.
I have no idea how to find the files you need. I plugged in my Xoom but I could never get into the system files. I R DUM
here they are
I came across this in the AOSP dev site http://source.android.com/porting/keymaps_keyboard_input.html#androidKeymapKeyLayoutMapTitle
I checked out my system/usr/keylayout/ folder and it shows 3 vendor layout files. i'm guessing those are the moto keyboard.
It looks like it can be done. Although the your xoom would have to be rooted to push a modded file.
looks like someone fixed this!
http://tinyw.in/078
What about generic bluetooth keyboards? I've seen that many for example use Apple keyboards. I was thinking about getting a generic bt keyboard from eBay and remap the keys. Is there any chance that can be done?
http://forum.xda-developers.com/showthread.php?t=1016594
Sent from my Xoom using Tapatalk
onicrom said:
looks like someone fixed this!
http://tinyw.in/078
Click to expand...
Click to collapse
B Dizzle said:
http://forum.xda-developers.com/showthread.php?t=1016594
Sent from my Xoom using Tapatalk
Click to expand...
Click to collapse
No they didn't fix it. All they did was show how to change what was in the config files for the keyboards and add a WAKE function to an existing button function in order to wake the tablet with the keyboard.
What it looks like is being asked here is how to remap the default application buttons on the motorola keyboard (ie,.. messaging, browser, music, etc). The messaging button does nothing on the Xoom since it can't send text messages and the button was really meant to perform this function on the Atrix. There has also been questions as to how you could remap the browser button to another browser since setting the default browser to something other than the chrome one does nothing.
I've looked over that entire file and not once in there did it show a mapping for those keys to their respective functions. The function buttons have settings there, but I don't know if changing those would have any affect.
Anyone???
in case anyone didn't know, you can press the "search" key + a letter to open up applications. For example, "search" + T opens up Google Talk.
tlkid064 said:
Hello all. I recently got the Bluetooth Motorola Keyboard and I was wondering if anyone would be able to explain how to change any of the hardware keys on the keyboard to open an application. Thanks in advance.
Click to expand...
Click to collapse
A bit late to reply, but maybe this can help you.
As 'gadgetluva' already mentioned, you can use the "search" key + a letter to launch some applications.
Previous versions of android allowed you to change the assignment of these in the settings. But somehow that option is gone in Honeycomb. The code to do it is still in there, but I didn't find any UI entry to it in the settings.
But, there is a dirty work around if you really want to change them. The application Task Switcher (there are multiple ones, I'm talking about the one from Jason Parekh) can be downloaded for free from the market. It's a nice and useful application, but you can also use it to open the hidden "Quick Launch" settings dialog. You do that by going to the settings of Task Switcher and choose Shortcut. That will open the "Quick Launch" settings dialog. In there you can (re-)assign the "search" key shortcuts at will.
It's a bit involved, but you only have to do this once ...
PS: Once you have Task Switcher installed, you can as well bind it to a key your not using with the free application exsbar. That way you also have a quick shortcut to switch between the running applications. A little bit like the Alt-Tab in windows.

[GUIDE] Take Back Your Headset Controls!

REQUIREMENTS
ROOT ACCESS
SINGLE-BUTTON HEADSET
ANDROID 4.1+
PREFACE
TESTED ON THE GALAXY NEXUS ON BOTH 4.1 and 4.2!
If you often listen to music using a single-button headset (the kind that our Nexus ships with), then you should know that Google lets you control the headset button. By default, you can:
Play/Pause (Single Press)
Skip track (Double Press)
Launch Voice Search (Single-click Long Press)
Pretty cool, right? So what's the deal, then?
The issue is you CANNOT customize how you want the system to respond to your button input.
What if you want to long press to increase volume?
What if you want to triple click to go to the previous track?
What if you want to double click and hold to decrease volume?
What if you want to launch an app besides Google Voice Search (I personally have bound utter! in place of Google's search!)?
Nope, too bad.
Well, there is a workaround for this.
How does it work?
In /system/usr/keylayout, two files called Generic.kl and sec_jack.kl reside where you can modify the keymapping of the HEADSETHOOK input to an alternate key that is normally found on a 3-button headset, specifically MEDIA_NEXT. Then, you can modify how the system responds to MEDIA_NEXT by using a headset control app.
TO FIX:
**NOTE: ITEMS SURROUNDED BY A BLUE BOX MEAN IT IS THE ORIGINAL VALUE WHILE ITEMS SURROUNDED BY A RED BOX MEANS IT IS THE NEW VALUE**
1) Install the Keytest App found here: https://github.com/chrisboyle/keytest/downloads
2) Once inside the app, press the headset button. On your screen, it should read as follows:
Code:
keyCode=KEYCODE_HEATSETHOOK
scanCode=226
as shown in the following picture: http://i.imgur.com/dogxm.png
3) Using a root-enabled file explorer app (I personally use Solid Explorer), go to /system/usr/keylayout and make a backup of Generic.kl and sec_jack.kl (copying them to your internal storage, for example /sdcard/headset).
4) You will modify these two files on two different lines. The folder should look like this: http://i.imgur.com/kK8h3.png
Generic.kl:
ORIGINAL: http://i.imgur.com/dzmPy.png AND http://i.imgur.com/bdRRz.png
NEW: http://i.imgur.com/ZddZT.png AND http://i.imgur.com/ZddZT.png
sec_jack.kl:
ORIGINAL: http://i.imgur.com/7Lg7T.png
NEW: http://i.imgur.com/E0Rfi.png
Simple right? You are just flipping the two values in both files.
5) Save the changes. Reboot.
6) Open the Keytest app again. Press the headset button. On your screen, it should read as follows:
Code:
keyCode=KEYCODE_MEDIA_NEXT
scanCode=226
as shown in the following picture: http://i.imgur.com/2BSHM.png
7) Now all you need to do is use an app to configure the MEDIA_NEXT key to your liking.
MEDIA_NEXT is a key typically found on 3-button headsets, symbolized by the "Right" key. An app like Headset Button Controller or Headset Droid should do the trick. Both are paid apps, but there are trial versions available. If there are any free alternatives that can do the trick, let me know and I'll add it in! (I am NOT in any way affiliated with the app developers!)
LIMITATIONS
1)A ROM update will wipe/reset the files.
1a) How can you avoid this? Pretty simple, actually! Just keep a backup of Generic.kl and sec_jack.kl after you make the changes to them, and inject them into the zip file before you flash the ROM. You can also use the following script to do this which needs to be run as root, given that you have the two files backed up in /sdcard/headset
Code:
mount -o rw,remount /system
cp -f /sdcard/headset/* /system/usr/keylayout
chmod 644 /system/usr/keylayout/*
mount -o ro,remount /system
2) An actual or simulated "MEDIA_NEXT" input will now not be recognized as a MEDIA_NEXT. This will affect, for example, 3-button headsets or tasker tasks that simulate a MEDIA_NEXT input. Also: ROMs with the long-press to skip tracks will no longer skip track on holding volume-up, as this is no longer recognized as a MEDIA_NEXT input.
2a) How can you avoid this? You can instead use a different key to be replaced rather than MEDIA_NEXT, if you so desire. The work-up will be the exact same, only the values you swap will be different.
CREDITS
Kenkiller: http://forum.xda-developers.com/showpost.php?p=32999600&postcount=38
Headset Button Controller Dev
Headset Droid Dev
Redditor muzeofmobo for the script
This does not work on JB VZW Gnex running Atom v1.38 with Klipsche S4A headphones.
t1.8matt said:
This does not work on JB VZW Gnex running Atom v1.38 with Klipsche S4A headphones.
Click to expand...
Click to collapse
Sorry for the late reply! Are you using a correct headset app to configure your MEDIA_NEXT button?
i tried both apps you listed in this thread and the klipsche app that is supposed to be used with these headphones. none of them worked.
I'm going to give this a try on Sourcery 4.5.

[Q] hp touchpad wireless keyboard (bluetooth) - remapping characters of the same key

Hi,
I've a Galaxy Nexus, with stock OS 4.2.2 and root... aaaaannnndddd, recently, an HP Touchpad Wireless Keyboard.
Pairing is easy, keyboard is good but... I write in portuguese most of the time and I miss some things.
I've made some tweaks on a new file I created on Keylayout folder (sistem/usr/keylayout/): "MENU" and a few others. Can someone give me some help on:
1. How to remap the other characters of one key?
2. How to combine characters, mainly accents (for instance: ´+a=á; or ^+e= ê; and so on)
3. How to remap a key to "ç" (cedilla)
I've made a search but found nothing about it.
Thanks!
ra

Starting launcher app (firestarter) on keyboard event

I'm using a replacement launcher (Firestarter) and a 3rd party wireless keyboard /mouse (Mele F10 Deluxe) -- things are working well, but one issue is that the "home" button on the Mele acts like the "HOME" key on a QWERTY keyboard. Instead of returning to the home screen, it sends keyboard event "KEYCODE_HOME" (Constant Value: 3 - 0x00000003).
On a (rooted) AFTV2, is there a way to assign a keyboard event (in this case, "KEYCODE_HOME") to launch a particular app (in my case, firestarter) regardless of what else is open?
Alternatively, is it possible to have the keyboard event "KEYCODE_HOME" perform the system "home" event?"
Thanks in advance for your thoughts!
http://www.mobileread.com/forums/showthread.php?t=159538
Thats five minutes on google.
The way I have solved this was to remap the keyboard layout of my Macbook Air to adb commands - whenever I run a script that can only be exited by clicking a button on a prompt. I actually remapped the entire MBA's keyboard to send the corresponding keys to the Fire TV as adb keyevents.
Code:
adb shell monkey -p your.app.package.name -c android.intent.category.LAUNCHER 1
does what you want in that case (de.belu.firestarter is the package name btw).
I dont think every button press will show up in the Fire TVs logs the same way HOME does ("nice little keylogger you sell there, A."), so instead you might have to do the remapping at another point. Your keyboard itself is too dumb to even know what being scripted means - that leaves you either messing with the OS itself - or forfeiting the keyboard in favor of an Ultrabook. Which by the way - allows you to actually work, or browse the net - and still control the Fire TV in the background.
But people seem to be happy with their Bluetooth keyboards - because, single purpose = neato.
On my k900 plus keyboard it has a home button, why not Just map Firestarter to start up when you press home twice, then you just press the home button twice on your keyboard?
Hope this helped press thanks button
harlekinrains said:
http://www.mobileread.com/forums/showthread.php?t=159538
Click to expand...
Click to collapse
Thanks for the links. For anyone else using a media airmouse such as the Mele F10 (with a "home" button that does not send the same code as the amazon remote), it's very straightforward to create a custom keyboard map that makes it function like the Amazon remote:
1) For each button that you would like to remap, use Ketest App to discover its ScanCode (for example "102" is the "Home" button on the Mele F10 Deluxe).
2) Determine the Product ID and Vendor ID for your input device with "cat /proc/bus/input/devices" and create a copy of /system/usr/keylayout/Generic.kl with the name Vendor_XXXX_Product_XXXX.kl. This custom key layout file contains your new mapping (for example, I changed the entry next to "Key 102" to "HOME" instead of "MOVE_HOME").
3) Set ownership (chown system.system) and permissions (chmod 644) for your custom key layout file.
deanr1977 said:
On my k900 plus keyboard it has a home button, why not Just map Firestarter to start up when you press home twice, then you just press the home button twice on your keyboard?
Hope this helped press thanks button
Click to expand...
Click to collapse
Thanks for sharing your experience. The issue is that on the Mele F10 Deluxe (and other combo devices that aren't designed specifically for the Fire TV box), the home button does not send the same key code as the Amazon remote -- requiring that the user create a custom key map file.
harlekinrains said:
http://www.mobileread.com/forums/showthread.php?t=159538
But people seem to be happy with their Bluetooth keyboards - because, single purpose = neato.
Click to expand...
Click to collapse
Thanks! Given the cost difference (plus, portability, and the fact that it lasts longer on a charge), I can understand why people might choose a media remote instead of a script-friendly keyboard with a screen (like an Ultrabook). Fortunately, if your 3rd party remote doesn't work like the Amazon remote out-of-the-box, it is easy to create a custom keymap. Unfortunately, this still means that, by default, FireStarter has to use ADB to listen for the home key. I was hoping that if I use a different button instead of the home key on the amazon remote, I can have the OS "listen" in a simpler way (that doesn't tie up ADB), and simply have the OS launch firestarter when this button is pressed.
Bluetooth keyboards are less clunky - thats right. So portability and also price are valid arguments for them.
But - there is also a lot that you "lose" by not using an ultrabook (beside the remote which at some point becomes just an easy to use muscle memory extension).
The argument here goes as this way -
1. Screen Mirroring is a very, very, stupid idea. Let the battery powered device do all the processing, then let it encode a video feed on top of that, and then let it transfer...
2. Link sharing on the other hand is "where its at". So for the Fire TV this means, you use the Chrome Plugin "Play to Kodi", which covers youtube and a few other sources - and you also use Video Download Helper (Chrome Plugin available as well) to get any direct video link that isnt a rtmp stream and heavily segmented and a little script that launches http://www.multilinkr.com/ in your browser, then you paste the url in your clipbord into that, use the site to generate a clickable link and then use rightclick and Play to Kodi to cast the direct video link to the Kodi Box.
Which brings me to -
3. Discoverability is pretty lousy on remote based interfaces (Kodi has the best interface for it there is out there.). Its also pretty bad on phones (which is part of why more and more content becomes facebook native and why you are so dependent on content surfacing within an app "you like") or tablets. Its actually pretty excellent on laptops. So in some sense - I see the ultrabooks as the last bastion of non curated content and real discoverability out there.
Kodi with keyboard at that stage simply doesnt cut it. Also if you are more than a novice user you need a device you use to do maintenance on Kodi - so again - why not an Ultrabook...
-
Regarding your previous question - I know that the adb way of Firestarter noticing "that the Home button was pressed" depends heavily on certain lines within a log that only indicate that _that_ button is being pressed. I dont know how its dev handled the non adb implementation - you have to ask him. It is very unlikely - that you'd find the same or an equivalent "event indication" when you press a random key on a connected keyboard.
Remember that the watcher routine has to look for something occurring, and that in the case of Firestarter this preferably has to show up on non rooted devices also. In fact - that Firestarter (and its predecessor) exist is a little miracle in its own right - because Amazon could make a very small change and it would never be able to work again. In that sense its a hack - that relies on a very specific pattern showing up in something the OS is reporting and that is accessible by any app (userspace).
Its not based on a featureset, its based on a hack.

Q: scancode for "back" softkey?

I have a bluetooth keyboard that I use with my totally stock GS Note 10.1 2014, running lollipop. There is a key that originally did nothing but launch the Google search bar. I disabled that and now have a dead key. I'd like to remap the Andoid "back" softkey to it.
I have an app that will let me re asign scan codes, but since the key is dead, there is no scan code for it (similar to the Fn key). Since it used to launch Google search, it can be made to work, I just don't know how. And I don't know the command code for the "back" softkey.
I do have a regular back key on the keyboard which works like a regular back key....it does not work like the Android "back"....it doesn't back out and close apps or menus.
Any suggestions? does anyone know the Andoid back command or how to find it?
thanks
I suppose it should be key 158. This is based on the information in /system/usr/keylayout/Generic.kl and /system/usr/keylayout/sec_touchscreen.kl. These files contain the keymappings (at least in cyanogenmod, but I suppose it's the same in stock?), you should be able to check them out and modify them with a filemanager like ES if you're rooted (sounds like you are). You can modify settings in there, though you might want to make a backup in case you mess anything up.

Categories

Resources