title: How do you detect if a user has a keyboard via Javascript?
body: <p>I'm building a site where I'm globally binding certain keys to shortcuts using the <code>keyup</code> event. For example, if someone presses the A key, a menu opens.</p>
  
  <p>I don't want to bind these triggers on mobile devices (such as phones and tablets). However, there's a number of people that use keyboards with their tablets. How would I detect if a keyboard input exists via Javascript? I know I can detect touch devices based on if <code>touchstart</code> exists, but that wouldn't work for people who are on tablets and have keyboards plugged in. I only want to bind the <code>keyup</code> events if a keyboard is present. What is the best way to go about doing this? </p>
  
  <p>Note: I know this is a nice-to-have, but I'd like to do it if possible.</p>
  
  <p>Thanks in advance!</p>