     scalings[KeyboardScaleMap.hashKey(for: Device.iPhone8Plus)] = Scaling(portrait: KeyboardSize(w: 414, h: 226, b: 45), landscape: KeyboardSize(w: 736, h: 162, b: 38))  // does not use full width in landscape
 
     // Start:  'safe area insets', which are not counted (here) as part of a keyboard's height.
+    //         Note that the widths reported for notched phones exclude part of the area to the sides in landscape b/c
+    //         of safe-area guidelines.  It's not exact, though, as the system globe & dictation keys go beyond those guides.
     scalings[KeyboardScaleMap.hashKey(for: Device.iPhoneX)]  = Scaling(portrait: KeyboardSize(w: 375, h: 216, b: 45), landscape: KeyboardSize(w: 724, h: 150, b: 38))  // insets:  p: 34, l: 21
     scalings[KeyboardScaleMap.hashKey(for: Device.iPhoneXR)]  = Scaling(portrait: KeyboardSize(w: 414, h: 226, b: 45), landscape: KeyboardSize(w: 808, h: 150, b: 38))  // insets:  p: 34, l: 21
     scalings[KeyboardScaleMap.hashKey(for: Device.iPhoneXS)]  = Scaling(portrait: KeyboardSize(w: 414, h: 216, b: 44), landscape: KeyboardSize(w: 724, h: 150, b: 38))  // insets:  p: 34, l: 21.  And yeah, that '44' isn't a typo.

    // All scalings below are taken from Simulator readings, using the most-up-to-date version of iOS that they support.
    // Note that the banner heights (at minimum) may vary across iOS versions!
    //
    // None of the widths seem accurate, but I've yet to figure out how to get the exact readings.

    // Nothing available for iOS 9.3.5 - Xcode does not provide a Simulator version.


      return forPortrait ? scaling.portrait : scaling.landscape
    }

    var isUnknown = false
    switch device {
      case .unknown(_):
        isUnknown = true
        fallthrough
      default:
        if !isUnknown {
          // We can still perform a mapping, but it's not ideal.
          log.warning("Keyboard scaling definition missing for device \(device.description)")
        }

        // The expected case:  isUnknown = true.
        // Applies to future models of iPhone and iPad.  DeviceKit is of no help here, so we
        // compute the closest-resolution known device.
        let mappedDevice = getUnknownDeviceMapping()

        // As noted in the scalings data-map, devices of the same dimensions tend to have the same
        // keyboard dimensions.  It's not a perfect rule, but should suffice for a stop-gap solution.
        let scaling = shared.scalings[KeyboardScaleMap.hashKey(for: mappedDevice)]!

        return forPortrait ? scaling.portrait : scaling.landscape
    }
  }
}
