@@ -253,31 +253,29 @@ class KeyboardKey: UIButton {
253
253
254
254
/// Adjusts the width of a key if it's one of the special characters on the iPad keyboard.
255
255
func adjustPadKeyWidth( ) {
256
- if ( usingExpandedKeyboard)
257
- {
256
+ if usingExpandedKeyboard {
258
257
scalarSpecialKeysWidth = ( disableAccentCharacters && keyboardState != . symbols) ? 2.2 : 1.0
259
258
scalarReturnKeyWidth = ( disableAccentCharacters && keyboardState != . symbols) ? 2.2 : 1.0
260
259
if key == " ABC " || key == " АБВ " {
261
260
layer. setValue ( true , forKey: " isSpecial " )
262
261
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * 1 ) . isActive = true
263
262
} else if [ " delete " , " #+= " , " selectKeyboard " , SpecialKeys . capsLock] . contains ( key) {
264
263
layer. setValue ( true , forKey: " isSpecial " )
265
- widthAnchor. constraint ( equalToConstant: numSymKeyWidth * scalarSpecialKeysWidth) . isActive = true //* 2 scalarSpecialKeysWidth = 1
264
+ widthAnchor. constraint ( equalToConstant: numSymKeyWidth * scalarSpecialKeysWidth) . isActive = true // *2 scalarSpecialKeysWidth = 1
266
265
} else if [ SpecialKeys . indent ] . contains ( key) {
267
266
layer. setValue ( true , forKey: " isSpecial " )
268
267
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * scalarIndentKeyWidth) . isActive = true // scalarIndentKeyWidth
269
268
} else if [ " shift " ] . contains ( key) {
270
269
layer. setValue ( true , forKey: " isSpecial " )
271
270
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * scalarShiftKeyWidth) . isActive = true // scalarShiftKeyWidth
272
271
} else if [ " return " ] . contains ( key) {
273
- layer. setValue ( true , forKey: " isSpecial " )
272
+ layer. setValue ( true , forKey: " isSpecial " )
274
273
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * scalarReturnKeyWidth) . isActive = true // scalarReturnKeyWidth
275
- }
276
- else if [ " 123 " , " .?123 " , " return " , " hideKeyboard " ] . contains ( key) {
277
- if key == " return "
278
- && ( controllerLanguage == " Portuguese " || controllerLanguage == " Italian " || commandState == . translate)
279
- && row == 1
280
- && DeviceType . isPad
274
+ } else if [ " 123 " , " .?123 " , " return " , " hideKeyboard " ] . contains ( key) {
275
+ if key == " return "
276
+ && ( controllerLanguage == " Portuguese " || controllerLanguage == " Italian " || commandState == . translate)
277
+ && row == 1
278
+ && DeviceType . isPad
281
279
{
282
280
layer. setValue ( true , forKey: " isSpecial " )
283
281
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * 1.5 ) . isActive = true
@@ -288,9 +286,7 @@ class KeyboardKey: UIButton {
288
286
} else if key != spaceBar && key != languageTextForSpaceBar {
289
287
widthAnchor. constraint ( equalToConstant: keyWidth) . isActive = true
290
288
}
291
- }
292
- else
293
- {
289
+ } else {
294
290
if key == " ABC " || key == " АБВ " {
295
291
layer. setValue ( true , forKey: " isSpecial " )
296
292
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * 1 ) . isActive = true
@@ -299,9 +295,9 @@ class KeyboardKey: UIButton {
299
295
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * 1 ) . isActive = true
300
296
} else if [ " 123 " , " .?123 " , " return " , " hideKeyboard " ] . contains ( key) {
301
297
if key == " return "
302
- && ( controllerLanguage == " Portuguese " || controllerLanguage == " Italian " || commandState == . translate)
303
- && row == 1
304
- && DeviceType . isPad
298
+ && ( controllerLanguage == " Portuguese " || controllerLanguage == " Italian " || commandState == . translate)
299
+ && row == 1
300
+ && DeviceType . isPad
305
301
{
306
302
layer. setValue ( true , forKey: " isSpecial " )
307
303
widthAnchor. constraint ( equalToConstant: numSymKeyWidth * 1.5 ) . isActive = true
@@ -314,8 +310,6 @@ class KeyboardKey: UIButton {
314
310
}
315
311
}
316
312
}
317
-
318
-
319
313
320
314
/// Adjusts the width of a key if it's one of the special characters on the keyboard.
321
315
func adjustKeyWidth( ) {
0 commit comments