[lkml]   [2011]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Reporting screen/laptop orientation data to userspace
> When an "change" event is received on an accelerometer,
> open its device node, and from the value, as well as the previous
> value of the property, calculate the device's new orientation,
> Possible values are:
> * undefined
> * normal
> * bottom-up
> * left-up
> * right-up

For quite a few of the discrete accelerometers not being used in
'joystick' mode this would make quite a sensible input interface,
at least for those that generate inputs for their transitions.

You need a couple more values though because some devices care if they
are held up/down/left/right or if they are lying flat on their front or
on their back.

Phones for example sometimes go to speakerphone if laid flat on their
back, and go into silent mode if turned over.


 \ /
  Last update: 2011-06-06 20:41    [W:0.117 / U:4.300 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site