When keyguard.scad lays out the elements of a tablet screen in a case, it assumes that the tablet, especially the tablet screen, sits in the center of the opening. 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. It’s the same thing for the space below and above the screen. That’s a good assumption for most 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.
But it still doesn’t match the layout of the grid!
Maybe you think that the screen sits in the middle of the case opening, or perhaps you’ve already adjusted the “unequal” settings, but things just aren’t lining up:
What can you do?
First, if you’ve already done a good job of laying out the grid area of the app—you’ve based your design on a valid screenshot, or you’ve rechecked all your measurements—then odds are that the screen isn’t in the middle of the opening. You need to revisit your measurements for the distance between the edge of the screen and the edge of the case opening on all four sides.
If your measurements haven’t changed, determine whether the tablet is sliding around inside the case. Maybe it doesn’t fit tightly enough or has been stretched out of shape over time. You may need to insert some material inside the case to keep the tablet from moving once inside. Then, take your measurements again.
Finally, your keyguard may be pushing against the case opening in a way that results in the keyguard not sitting in the center of the opening. This can occur with soft-sided cases.
The solution is to update your “unequal” settings to align the keyguard openings with the buttons below. You’ll make those changes “by eye.” You’ll need a screenshot of the app to put behind the keyguard in the designer’s display pane. Then, you’ll use these two options to move the screenshot until it looks out of place in the same way that the actual keyguard does:
As the names imply, move the horizontal slider to the left, and the screenshot will move to the left. Move the vertical slider to the right, and the screenshot will move upward.
Here, the sliders have been used to recreate the misalignment in the designer:
cell opening to replicate |
slide screenshot horizontally = -23 |
In the Customizer, you’re told to “see instructions in the Console pane,” which say:
These instructions tell you to update your current values for the two “unequal” options and then return the two “move screen” options to 0.
Here are the results of changing the two “unequal” options to the recommended values:
before the change | after the change |
The left border of the keyguard got a little thinner, which has the effect of moving the openings closer to the left. The bottom border of the keyguard got a little wider, which has the effect of moving the openings upward. Note that the right side of the keyguard and the top of the keyguard were widened and thinned an equal amount, respectively. The keyguard itself didn’t change in its overall size, so it will continue to fit tightly in the case opening.
You may have noticed that the screenshot didn’t move during this process. That’s OK. You should now set the two “move” options back to zero.
Reprint the keyguard and test whether the alignment is now acceptable.