                     "keyGap%dx%d",
                     row: i,
                     startIndex: 1,
-                    endIndex: keyboard.rows[i].count - 1,
+                    endIndex: rowsCount - 1,
                     vertical: false,
                     width: layout["keyGap"]!)
             }


import UIKit

let layout: Dictionary<String, Double> = [
    "leftGap": 3,
    "rightGap": 3,
    "topGap": 9,

                    "keyGap%dx%d",
                    row: i,
                    startIndex: 2,
                    endIndex: rowsCount - 2,
                    vertical: false,
                    width: layout["keyGap"]!)
            }
