# Re: Reporting screen/laptop orientation data to userspace

- From: Bastien Nocera \<hadess@hadess.net\>
- Date: 2011-06-20 14:54:09 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2011/06/3731657
- Thread: https://ratatoskr.run/linux-input/2011/05/3721818/t.md

```text
On Mon, 2011-06-06 at 19:41 +0100, Alan Cox wrote:
> > 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,
> > and export it as ID_INPUT_ACCELEROMETER_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.

I'm not designing for phones though, and it seems to me this should be a
separate attribute anyway (and so did the people who wrote sensorfw for
MeeGo Handset).

```
