Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
dodava
Old
(Last edited by dodava; 22nd March 2012 at 12:09 AM.)
#1  
Senior Member - OP
Thanks Meter 375
Posts: 218
Join Date: Jul 2007
Location: Virginia
Default How to add dock keyboard function key support for AOSP (for developers)

I have added support for the dock keyboard function keys (Wireless, Bluetooth, Touchpad, etc). This required adding support for the non-standard Asus keycode labels (this was the easy part) and adding code to the framework to send the related keyevents to the Asus keyboard service.

Attached is a zip file with the updated source files. In addition you will need to have the Asus Keyboard.apk app resigned with a AOSP cert. You need to either resign it yourself or you can extract it from the zip attached to this post, http://forum.xda-developers.com/show....php?t=1542502.

Also some ROMs have switched to using the keylayout and keychar files from the above post. DO NOT use these going forward! The entries for the function keys were remarked out of these files to prevent issues which no longer exist now that the Asus keycodes are supported. The function keys will not work if you use these files. You should use the original keylayout and keychar files shipped by Asus.

I have no plans to submit these myself to any of the AOSP projects. If you maintain the TF101 port for any AOSP ROMs feel free to submit the patches to your project.
Attached Files
File Type: zip tf101_function_keys.zip - [Click for QR Code] (74.8 KB, 166 views)
The Following 18 Users Say Thank You to dodava For This Useful Post: [ Click to Expand ]
 
dodava
Old
#2  
Senior Member - OP
Thanks Meter 375
Posts: 218
Join Date: Jul 2007
Location: Virginia
Just a side not here. The code changes for sending the keycodes to the Asus keyboard service are in PhoneWindowManager.java. While looking through the smali of the Asus implementation I noticed a lot of Asus added code related to detecting if the lid is closed on the dock. I suspect this is where the changes to fix waking up when the lid is closed are going to need to be implemented. Unfortunately I won't have time to look more at it for a few weeks due to work obligations but thought I would provide a pointer to others who may want to.

Sent from my Transformer TF101 using Tapatalk
The Following User Says Thank You to dodava For This Useful Post: [ Click to Expand ]
 
ricardopvz
Old
#3  
Senior Member
Thanks Meter 712
Posts: 552
Join Date: Feb 2011

 
DONATE TO ME
Quote:
Originally Posted by dodava View Post
Just a side not here. The code changes for sending the keycodes to the Asus keyboard service are in PhoneWindowManager.java. While looking through the smali of the Asus implementation I noticed a lot of Asus added code related to detecting if the lid is closed on the dock. I suspect this is where the changes to fix waking up when the lid is closed are going to need to be implemented. Unfortunately I won't have time to look more at it for a few weeks due to work obligations but thought I would provide a pointer to others who may want to.

Sent from my Transformer TF101 using Tapatalk
Roach already fixed that, but the screen only turns off when the dock is inserted
I made some small changes to that code and implemeted in my rom and the screen also turns off if the tab is not docked. I made this change because of my cover having a magnet to turn the screen off
ROM: [ICS 4.0.4] Megatron (CM9 based) (Working dock and 3G)
NTFS and exFAT support
OC kernels support
PS3 Controller support
Quick Apps - Video
 
timbit123
Old
(Last edited by timbit123; 22nd March 2012 at 03:39 AM.)
#4  
Senior Member
Thanks Meter 294
Posts: 265
Join Date: Nov 2010
Location: Quebec

 
DONATE TO ME
thank for your work trying to merge it into cna version!
Hmm i got the Asus keyboard working from my build, but still missing mapping of top buttons, maybe i forgot some code from PhoneWindowManager.java
You can now follow MedroidMod and my work on twitter : @MedroidMod
 
dodava
Old
#5  
Senior Member - OP
Thanks Meter 375
Posts: 218
Join Date: Jul 2007
Location: Virginia
Quote:
Originally Posted by timbit123 View Post
thank for your work trying to merge it into cna version!
Hmm i got the Asus keyboard working from my build, but still missing mapping of top buttons, maybe i forgot some code from PhoneWindowManager.java
Did you remember to use the original Asus keylayout and keychars files instead of what was in my Asus keyboard package?

Sent from my PG86100 using Tapatalk
 
timbit123
Old
#6  
Senior Member
Thanks Meter 294
Posts: 265
Join Date: Nov 2010
Location: Quebec

 
DONATE TO ME
Ok forgot that part, thx building a new test again
You can now follow MedroidMod and my work on twitter : @MedroidMod
 
linuques
Old
#7  
Senior Member
Thanks Meter 29
Posts: 185
Join Date: Feb 2011
Great work, man. Thanks!

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Nandroid Manager Receives Major Update

Do you find yourself obsessively jumping from ROM to ROM? And do you hate having to restore a full … more

Careers in Android: Recruiter Reveals How Resumes are Chosen – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

HttpClient Tutorial to Upload and Download with Your App

Developers wanting to interact with the Internet need to choose a package to do the … more

Profile Flow: A Tasker Alternative

By now, we’re all quite familiar with Tasker, the personal automation app that seems to be able to … more