Unbalanced Case Openings

When keyguard.scad is laying out the elements of a tablet screen in a case it makes an assumption that the tablet, and especially the tablet screen, sits in the center of the opening in the case.  The distance from the left edge of the case opening to the left edge of the screen is the same as the distance from the right edge of the case opening to the right edge of the screen.  Same thing for the space below and above the screen.  That’s a good assumption for the vast majority of tablet cases, but there can be exceptions.

Sometimes, the case can be a little large for the tablet, or sometimes, the tablet gets stretched-out by having the tablet inserted and removed often.  Sometimes, the case manufacturer intentionally creates a case that overlaps the tablet more on one side than on another.  One example is the LifeProof NÜÜD case.  Here, in portrait mode, the space above the screen is much larger than the space below the screen (note the distance between the two blue lines at the top and the two at the bottom of the screen):

If you were using this tablet in landscape mode, the space to the left of the screen will be larger than the space to the right.  Unless you take special action, it would be impossible to get the openings in a standard grid-based keyguard to align with the buttons in an AAC app in this case.

Fortunately, there are two keyguard.scad options that can handle the necessary adjustment.  They’re the middle two options in the Special Actions and Settings category:

To determine whether you need to set these options to a value other than zero, just measure the borders on each side of the screen.  If the left is different from the right, just set that value for the “unequal left side of case opening”.  If the bottom border is different from the top border, just set that value for the “unequal bottom side of case”.  If the screen sits exactly in the middle of the case opening, just leave these values set at zero.

Then go ahead and design your keyguard as you always have.  Remember, if you’re going to create a hybrid design, any additional cuts you make in the area of the screen should be positioned relative to the upper-left (or lower-left, depending on your settings) of the screen – as always.