10

Hp x360 Laptops have a "hinge screen". The screen can be opened and flipped till 360 degrees.

I want to do some scripting with some commands that activate when the screen is flipped beyond a certain angle. How can I detect the angle?

...I'm imagining it's a function that returns some value (within a range of values)? Does it work that way? Or maybe is's a "flag" set to true or false?

How can I check?

842Mono
  • 9,790
  • 28
  • 90
  • 153
  • Why would you be able to detect the angle? Do you know that there's the hardware to handle this in the hinges or are you expecting an answer that uses image recognition through the webcam to work out which way up it's being held? – Oli Jan 25 '17 at 12:32
  • 2
    @Oli Many 2-in-1s have sensors to switch between "tablet" and "laptop" mode, so you can automatically disable the keyboard while you don't need it or rotate the screen by 180 degrees. But that does not necessarily mean there's an open API for that... – NeoTheThird Jan 25 '17 at 13:30
  • @Oli I know there's some hardware because it comes with windows and it switches to a tablet when I rotate. I don't know where to start searching for that hardware thing. Where should I look? – 842Mono Jan 29 '17 at 19:35
  • @Oli in fact I also think there's a g sensor in there because screen rotates too. I was planning to make a question for it after I get an answer to this. All for the ultimate purpose of this hehe :D – 842Mono Jan 29 '17 at 19:39

1 Answers1

1

I checked and there are no interfaces that userspace programs can use to get this information and to my knowledge no platform driver in the kernel will provide you with this data.