3

I need to be able to tell if a user is using a laptop or not, using c++ code. There were a few suggestions (such as checking if there is a battery) here: How can I tell if a user is using a laptop and here: Detect if application is running on laptop but none of them seems definitive. Edit: the os is windows.

ori
  • 43
  • 5
  • 3
    Since this probably has different answers depending on the OS, you might want to specify what OS you're targeting. – domsson Jan 12 '20 at 10:07
  • I think you can find your answer [here](https://stackoverflow.com/questions/4849447/detect-if-application-is-running-on-laptop) – Mohammed Deifallah Jan 12 '20 at 10:12
  • You can always check the output of querying the touchpad. Unlikely to have one unless on a laptop. For Linux see `libinput list-devices` [libinput](https://wiki.archlinux.org/index.php/Libinput) and also [Touchpad Synaptics](https://wiki.archlinux.org/index.php/Touchpad_Synaptics) for ideas of what to check. – David C. Rankin Jan 12 '20 at 10:16
  • 2
    Why do you need to know laptop or not? How about tablet? Notebook? Mouseless kiosk? Try to avoid the trap of an XY-problem. https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem – Yunnosch Jan 12 '20 at 10:27
  • Does this answer your question? [How can I tell if a user is using a laptop](https://stackoverflow.com/questions/2837152/how-can-i-tell-if-a-user-is-using-a-laptop) –  Jan 12 '20 at 10:27
  • Why do You need to know the type of device? What do You want to do with this information? – Robert Andrzejuk Jan 12 '20 at 11:03

0 Answers0