     
     static func sideEdgesPortrait(width: CGFloat) -> CGFloat { return self.findThreshhold(self.sideEdgesPortraitArray, threshholds: self.sideEdgesPortraitWidthThreshholds, measurement: width) }
     static func topEdgePortrait(width: CGFloat) -> CGFloat { return self.findThreshhold(self.topEdgePortraitArray, threshholds: self.topEdgePortraitWidthThreshholds, measurement: width) }
+    static func rowGapPortrait(width: CGFloat) -> CGFloat { return self.findThreshhold(self.rowGapPortraitArray, threshholds: self.rowGapPortraitThreshholds, measurement: width) }
+    
+    static func rowGapPortraitLastRow(width: CGFloat) -> CGFloat {
+        let index = self.findThreshholdIndex(self.rowGapPortraitThreshholds, measurement: width)
+        if index == self.rowGapPortraitLastRowIndex {
+            return self.rowGapPortraitLastRow
+        }
+        else {
+            return self.rowGapPortraitArray[index]
+        }
+    }
     
     static func keyboardShrunkSize(width: CGFloat) -> CGFloat {
         if width >= self.keyboardShrunkSizeBaseWidthThreshhold {

            }()
            
            for (r, row) in enumerate(page.rows) {
                let frame = CGRectMake(sideEdges, topEdge + CGFloat(r) * (keyHeight + rowGaps), bounds.width - CGFloat(2) * sideEdges, keyHeight)
                self.handleRow(row, keyGaps: keyGaps, letterKeyWidth: letterKeyWidth, frame: frame)
            }
        }

    "specialKeyWidth": 34,
    "doneKeyWidth": 50,
    //    "spaceWidth": 138,
]
func layoutMetric(name: String) -> CGFloat { return CGFloat(globalLayout[name]!) }

