Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Koush
Old
#1  
Recognized Developer - OP
Thanks Meter 880
Posts: 917
Join Date: Sep 2007
Default HTC Stylus Sensor

So, the two people (Kai and some other guy) who figured out how to detect if the Stylus is in or out of the device didn't post about they did it. I Don't know if it's supposed to be a big secret or what. It's pretty simple:

HKEY_CURRENT_USER\ControlPanel\Keybd\StylusOutStat us
If it is 0, it's in. If it is 1, it's out.

I'll update the Sensors API shortly to give easy access to these events.
 
Koush
Old
#2  
Recognized Developer - OP
Thanks Meter 880
Posts: 917
Join Date: Sep 2007
I've updated the Sensor SDK to give access and eventing to the Stylus State.

More info and download for the source to all the sensors available at my website.

I'll be writing an app launcher for when the Stylus is removed from the device. And of course, it will be free.
 
WhiT3Kr0w
Old
#3  
WhiT3Kr0w's Avatar
Member
Thanks Meter 0
Posts: 56
Join Date: Aug 2008
Thanks for the source code man.
This will also prove useful to start learning about developing some tools.
Carpe diem quam minimum credula postero

Samsung Nexus 10
Samsung Galaxy S2
ZTE Blade

http://www.androidpt.com
 
charly_mx
Old
#4  
Senior Member
Thanks Meter 1
Posts: 738
Join Date: Jan 2007
Quote:
Originally Posted by Koush View Post
So, the two people (Kai and some other guy) who figured out how to detect if the Stylus is in or out of the device didn't post about they did it. I Don't know if it's supposed to be a big secret or what. It's pretty simple:

HKEY_CURRENT_USER\ControlPanel\Keybd\StylusOutStat us
If it is 0, it's in. If it is 1, it's out.

I'll update the Sensors API shortly to give easy access to these events.
Very usefull find my friend thankx
Omnia II. HTC Diamond on the Shelf now | ROM: Duttys_V4.0 Full CVSD| Best Radio: [SU] 1.12.25.19 | Protocol: 52.29.25.12W | HardSPL: 1.93.OliNex | Carrier: TELCEL | GPS Navigator: Destinator 7, Mexico Maps Q4 2008
 
skiwithpete
Old
#5  
Senior Member
Thanks Meter 1
Posts: 106
Join Date: Jul 2008
looking forward to it.

the questions I have are:

How small can you make this app? Will I be able to run it in the background without noticing a significant performace/battery hit?

How sophisticated can you make it? If I pull out the pen when in Notes or Word, it won't do anything, but if I pull the pen out at the Home screen it launches Word. Or when I put the stylus back while browsing it does nothing, but otherwise sends the phone into sleep mode.

Cheers again, look forward to it.
 
skiwithpete
Old
#6  
Senior Member
Thanks Meter 1
Posts: 106
Join Date: Jul 2008
Did this just go away?
 
vectorbl
Old
#7  
vectorbl's Avatar
Member
Thanks Meter 1
Posts: 44
Join Date: Apr 2008
Location: Torino
Quote:
Originally Posted by Koush View Post
I've updated the Sensor SDK to give access and eventing to the Stylus State.

More info and download for the source to all the sensors available at my website.

I'll be writing an app launcher for when the Stylus is removed from the device. And of course, it will be free.
Hello Koush,
did you have time to develop this launcher with stilus out/in?
In my opinion this is a very interesting funtion.
http://forum.xda-developers.com/image.php?type=sigpic&userid=957180&dateline=12386  04017
--- HTC Touch HD T8282 ---
 
ψυβερια
Old
#8  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Sep 2008
i found out a new way to see if the stylous is in or out.. YOU LOOK AT THE BOTTOM RIGHT CORNER OF YOUR DIVICE.

why is this programm necesery? i mean.. come on...
 
Ikari
Old
#9  
Ikari's Avatar
Member
Thanks Meter 0
Posts: 97
Join Date: Mar 2006
Quote:
Originally Posted by ψυβερια View Post
i found out a new way to see if the stylous is in or out.. YOU LOOK AT THE BOTTOM RIGHT CORNER OF YOUR DIVICE.

why is this programm necesery? i mean.. come on...
WTF??? you must be joking !!!
Like Drag and Drifting?
Test Pocket Gforce
or better Pocket Gforce 2


Help me develop, donate
 
ψυβερια
Old
#10  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Sep 2008
i am..............................

 
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

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more

Flash Custom ROM and Recovery to Samsung Galaxy S 4

After reading about Dan Rosenberg’s bootloader exploit for the Samsung Galaxy S 4,I … more

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more