                         
                         setColorsForKey(keyView, key)
                         
+                        // font sizing
                         switch key.type {
                         case
                         Key.KeyType.ModeChange,

    func createKeyConstraints(keyboard: Keyboard) {
        var allConstraints: Array<String> = []
        
        for i in 0..<keyboard.rows.count {
            for j in 0..<keyboard.rows[i].count {
                let keyModel = keyboard.rows[i][j]
                
                let keyName = "key\(j)x\(i)"
                let key = self.elements[keyName]
                
                let canonicalKey = elements["key0x0"]
                let canonicalRowKey = elements["key0x\(i)"]
                let isCanonicalKey = (key == canonicalKey) // TODO:
                let isCanonicalRowKey = (key == canonicalRowKey) // TODO:
                
                var width = ""
                
                switch keyModel.type {
                case Key.KeyType.KeyboardChange, Key.KeyType.ModeChange, Key.KeyType.SpecialCharacter, Key.KeyType.Period:
                    width = "(specialKeyWidth)"
                case Key.KeyType.Space:
                    width = "(spaceWidth)"
                case Key.KeyType.Return:
                    width = "(doneKeyWidth)"
                default:
                    break
                }
                
                allConstraints += "[keyGap\(j)x\(i)][\(keyName)\(width)][keyGap\(j+1)x\(i)]"
                
                if isCanonicalRowKey {
                    allConstraints += "V:[rowGap\(i)][\(keyName)][rowGap\(i+1)]"
                }
                else {
                    self.centerItems(key!, item2: canonicalRowKey!, vertical: false)
                }
                
                // only the canonical key has a constant width
                if isCanonicalKey {

                        keyView.enabled = true
                        keyView.setTranslatesAutoresizingMaskIntoConstraints(false)
                        keyView.text = key.keyCap
                        
                        self.forwardingView.addSubview(keyView)
                        
