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?

4
  • 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, 2017 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... Jan 25, 2017 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?
    – steoiatsl
    Jan 29, 2017 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
    – steoiatsl
    Jan 29, 2017 at 19:39

1 Answer 1

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.

2
  • sry for being late & thx for the answer :D how can I somehow make change? where should I "post" an issue like this?
    – steoiatsl
    May 16, 2017 at 14:51
  • ...after checking your profile apparently I already did? hehe XD
    – steoiatsl
    May 16, 2017 at 15:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .