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 '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... 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? 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 Jan 29 '17 at 19:39
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? May 16 '17 at 14:51
  • ...after checking your profile apparently I already did? hehe XD May 16 '17 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.