diff --git a/Keyboards/KeyboardsBase/InterfaceVariables.swift b/Keyboards/KeyboardsBase/InterfaceVariables.swift index 4541a5ca..55c98525 100644 --- a/Keyboards/KeyboardsBase/InterfaceVariables.swift +++ b/Keyboards/KeyboardsBase/InterfaceVariables.swift @@ -56,7 +56,7 @@ let scalarKeyCornerRadiusPad = 9.0 let scalarKeyCornerRadiusPhone = 6.0 let scalarFontPad = 0.475 let scalarFontPhone = 0.435 -let scalarIndentKeyWidth = 1.7 +let scalarIndentKeyWidth = 1.65 let scalarLetterNumSymKeyWidth = 0.9 let scalarLetterNumSymKeyWidthLandscapeViewPad = 1.2 let scalarLetterNumSymKeyWidthLandscapeViewPhone = 1.5 @@ -66,7 +66,6 @@ var scalarRightShiftKeyWidth = 2.2 var scalarSpecialKeysWidth = disableAccentCharacters ? 2.2 : 1.0 var scalarDeleteKeyWidth = disableAccentCharacters ? 2.2 : 1.0 var scalarCapsLockKeyWidth = 1.8 -var accentCharactersDisabledandKeyboardStateNotSymbols = (disableAccentCharacters && keyboardState != .symbols) // Keyboard elements. var spaceBar = String() diff --git a/Keyboards/KeyboardsBase/KeyboardKeys.swift b/Keyboards/KeyboardsBase/KeyboardKeys.swift index 0493e65d..b57e50e5 100644 --- a/Keyboards/KeyboardsBase/KeyboardKeys.swift +++ b/Keyboards/KeyboardsBase/KeyboardKeys.swift @@ -267,37 +267,12 @@ class KeyboardKey: UIButton { /// Adjusts the width of a key if it's one of the special characters on the iPad keyboard. func adjustPadKeyWidth() { if usingExpandedKeyboard { - accentCharactersDisabledandKeyboardStateNotSymbols = (disableAccentCharacters && keyboardState != .symbols) - // Switch case for controller language - switch (controllerLanguage){ - case "Spanish": - scalarCapsLockKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 2.0 : 1.2 - scalarSpecialKeysWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 2.2 : 1.0 - scalarReturnKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.7 : 1.3 - scalarDeleteKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.65 : 1.0 - scalarShiftKeyWidth = 1.8 - case "German", "Swedish": - scalarCapsLockKeyWidth = 1.8 - scalarReturnKeyWidth = 1.3 - scalarSpecialKeysWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 2.2 : 1.0 - scalarReturnKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 2.2 : 1.0 - scalarDeleteKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.65 : 1.0 - case "French": - scalarCapsLockKeyWidth = 1.2 - scalarReturnKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.4 : 1.0 - scalarShiftKeyWidth = 1.8 - scalarDeleteKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.65 : 1.0 - case "Italian": - scalarSpecialKeysWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 2.2 : 1.0 - scalarReturnKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.5 : 1.0 - scalarCapsLockKeyWidth = 1.3 - scalarShiftKeyWidth = 1.8 - scalarDeleteKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.65 : 1.2 - default: - scalarSpecialKeysWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 2.2 : 1.0 - scalarReturnKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 2.2 : 1.0 - scalarDeleteKeyWidth = accentCharactersDisabledandKeyboardStateNotSymbols ? 1.65 : 1.0 - } + scalarCapsLockKeyWidth = 1.3 + scalarDeleteKeyWidth = 1.65 + scalarReturnKeyWidth = 1.3 + scalarShiftKeyWidth = 1.5 + scalarSpecialKeysWidth = 1.0 + if key == "ABC" || key == "АБВ" { layer.setValue(true, forKey: "isSpecial") widthAnchor.constraint(equalToConstant: numSymKeyWidth * 1).isActive = true @@ -313,12 +288,12 @@ class KeyboardKey: UIButton { } else if [SpecialKeys.indent].contains(key) { layer.setValue(true, forKey: "isSpecial") widthAnchor.constraint(equalToConstant: numSymKeyWidth * scalarIndentKeyWidth).isActive = true - } else if ["shift"].contains(key) && idx == 0{ + } else if ["shift"].contains(key) && idx == 0 { layer.setValue(true, forKey: "isSpecial") widthAnchor.constraint(equalToConstant: numSymKeyWidth * scalarShiftKeyWidth).isActive = true } else if ["shift"].contains(key) && (idx > 0) { layer.setValue(true, forKey: "isSpecial") - widthAnchor.constraint(equalToConstant: numSymKeyWidth * scalarRightShiftKeyWidth ).isActive = true + widthAnchor.constraint(equalToConstant: numSymKeyWidth * scalarRightShiftKeyWidth).isActive = true } else if ["return"].contains(key) { layer.setValue(true, forKey: "isSpecial") widthAnchor.constraint(equalToConstant: numSymKeyWidth * scalarReturnKeyWidth).isActive = true diff --git a/Keyboards/LanguageKeyboards/Danish/DAInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Danish/DAInterfaceVariables.swift index a0afc511..91d3c21c 100644 --- a/Keyboards/LanguageKeyboards/Danish/DAInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Danish/DAInterfaceVariables.swift @@ -67,18 +67,18 @@ public enum DanishKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["$", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "'", "delete"], - [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "@", "*"], + ["kr", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "´", "delete"], + [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "@", "¨"], [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "æ", "ø", "'", "return"], - ["shift", "<", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + ["shift", "*", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"], + [SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "_", "€", ",", ".", "-", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/English/ENInterfaceVariables.swift b/Keyboards/LanguageKeyboards/English/ENInterfaceVariables.swift index a7918cf9..b4b9c286 100644 --- a/Keyboards/LanguageKeyboards/English/ENInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/English/ENInterfaceVariables.swift @@ -67,18 +67,18 @@ public enum EnglishKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"], + ["~", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"], [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "\\"], - [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "return"], - ["shift", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "shift"], + [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", ":", ";", "'", "return"], + ["shift", "-", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "~"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "—", "~", "°"], + [SpecialKeys.capsLock, "-", "\\", ":", ";", "(", ")", "&", "@", "$", "£", "¥", "€", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "|", "_", ".", ",", "/", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/French/FR-AZERTYInterfaceVariables.swift b/Keyboards/LanguageKeyboards/French/FR-AZERTYInterfaceVariables.swift index b5b278b0..eff82cd8 100644 --- a/Keyboards/LanguageKeyboards/French/FR-AZERTYInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/French/FR-AZERTYInterfaceVariables.swift @@ -67,18 +67,18 @@ public enum FrenchKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["@", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "°", "–", "delete"], - [SpecialKeys.indent, "a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "^", "$", "*"], - [SpecialKeys.capsLock, "q", "s", "d", "f", "g", "h", "j", "k", "l", "m", "€", "%", "return"], - ["shift", "/", "w", "x", "c", "v", "b", "n", ",", ".", "<", ">", "shift"], + ["@", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ç", "à", "delete"], + [SpecialKeys.indent, "a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "^", "+", "*"], + [SpecialKeys.capsLock, "q", "s", "d", "f", "g", "h", "j", "k", "l", "m", "ù", "#", "return"], + ["shift", "/", "w", "x", "c", "v", "b", "n", ":", "-", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "§"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.indent, "\"", "|", "§", "[", "]", "{", "}", "-", "%", "=", "^", "+", "*"], + [SpecialKeys.capsLock, "/", "…", "_", "(", ")", "&", "$", "£", "¥", "€", "@", "#", "return"], // "undo" + ["shift", "'", "?", "!", "~", "≠", "°", ";", ":", "-", ",", ".", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/French/FR-QWERTYInterfaceVariables.swift b/Keyboards/LanguageKeyboards/French/FR-QWERTYInterfaceVariables.swift index 2a5ef17f..5e7aa7a4 100644 --- a/Keyboards/LanguageKeyboards/French/FR-QWERTYInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/French/FR-QWERTYInterfaceVariables.swift @@ -76,7 +76,7 @@ public enum FrenchQWERTYKeyboardConstants { ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "~"], [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + ["shift", "…", "?", "!", "≠", "°", "'", "\"", "_", ",", ".", "€", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift b/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift index 27204b12..8345734b 100644 --- a/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift @@ -85,23 +85,23 @@ public enum GermanKeyboardConstants { ["^", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ß", "´", "delete"], [SpecialKeys.indent, "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", "+", "*"], [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "#", "return"], - ["shift", "<", "y", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + ["shift", "'", "y", "x", "c", "v", "b", "n", "m", "-", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let letterKeysPadExpandedDisableAccents = [ ["^", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ß", "´", "delete"], - [SpecialKeys.indent, "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "+", "*"], - [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "#", "return"], - ["shift", "<", "y", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + [SpecialKeys.indent, "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "=", "+", "*"], + [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "/", "@", "#", "return"], + ["shift", "'", "y", "x", "c", "v", "b", "n", "m", "-", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "§"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.indent, "\"", "|", "§", "[", "]", "{", "}", "—", "%", "^", "=", "+", "*"], + [SpecialKeys.capsLock, ":", ";", "(", ")", "&", "$", "£", "¥", "€", "/", "@", "#", "return"], // "undo" + ["shift", "'", "?", "!", "~", "≠", "°", "…", "_", "-", ",", ".", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift index f0c896e0..98dba7f5 100644 --- a/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Hebrew/HEInterfaceVariables.swift @@ -75,10 +75,10 @@ public enum HebrewKeyboardConstants { ] static let symbolKeysPadExpanded = [ - ["±", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], + [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "—"], + [SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "€", "return"], // "undo" + ["shift", "…", "?", "!", "~", "≠", "'", "\"", "_", ",", ".", "-", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift index 3959c03f..d57a5060 100644 --- a/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift @@ -67,18 +67,18 @@ public enum ItalianKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["\\", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "'", "ì", "delete"], + ["\\", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "‘", "ì", "delete"], [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "è", "+", "*"], [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "ò", "à", "ù", "return"], - ["shift", "<", "z", "x", "c", "v", "b", "n", "m", ",", ".", ">", "shift"], + ["shift", "'", "z", "x", "c", "v", "b", "n", "m", "-", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "§"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "shift" + [SpecialKeys.capsLock, "°", "/", ":", ";", "(", ")", "&", "@", "$", "£", "¥", "~", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "_", "€", "-", ",", ".", "shift"], // "shift" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/Norwegian/NBInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Norwegian/NBInterfaceVariables.swift index 64c01de1..67d74bcf 100644 --- a/Keyboards/LanguageKeyboards/Norwegian/NBInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Norwegian/NBInterfaceVariables.swift @@ -67,18 +67,18 @@ public enum NorwegianBokmålKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["'", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "'", "delete"], + ["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "´", "delete"], [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "^", "*"], [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "ø", "æ", "@", "return"], - ["shift", "<", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + ["shift", "'", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "°"], + [SpecialKeys.capsLock, "—", "/", ":", ";", "(", ")", "&", "@", "$", "£", "¥", "~", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "_", "€", ",", ".", "-", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift index e1607c0b..c11a7447 100644 --- a/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift @@ -67,18 +67,18 @@ public enum PortugueseKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"], + ["~", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"], [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "\\"], - [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "return"], - ["shift", "z", "x", "c", "v", "b", "n", "m", "<", ">", "/", "shift"], + [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", ":", ";", "ç", "return"], + ["shift", "'", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ - ["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "~"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], + [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "—", "|", "~"], + [SpecialKeys.capsLock, "°", "\\", ":", ";", "(", ")", "&", "@", "$", "£", "¥", "€", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "_", "-", ",", ".", "/", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift index 43a6bad5..e186e1c8 100644 --- a/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift @@ -67,18 +67,18 @@ public enum RussianKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"], + ["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "delete"], [SpecialKeys.indent, "й", "ц", "у", "к", "е", "н", "г", "ш", "щ", "з", "х", "ъ", "+"], [SpecialKeys.capsLock, "ф", "ы", "в", "а", "п", "р", "о", "л", "д", "ж", "э", "ё", "return"], - ["shift", "[", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю", "/", "shift"], + ["shift", "'", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю", "/", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ - ["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], + ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\\", "|", "₽"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.capsLock, "—", "/", ":", ";", "(", ")", "&", "@", "$", "£", "¥", "~", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "_", "€", "-", ",", ".", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] @@ -106,7 +106,7 @@ func getRUKeys() { // Use the expanded keys layout if the iPad is wide enough and has no home button. if usingExpandedKeyboard { letterKeys = RussianKeyboardConstants.letterKeysPadExpanded - letterKeys = RussianKeyboardConstants.symbolKeysPadExpanded + symbolKeys = RussianKeyboardConstants.symbolKeysPadExpanded allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined()) } else { @@ -120,7 +120,7 @@ func getRUKeys() { } leftKeyChars = ["й", "ф", "1", "@", "$"] - // TODO: add "х" to rightKeyChar if the keyboard has 4 rows + // TODO: add "х" to rightKeyChar if the keyboard has 4 rows. rightKeyChars = [] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift index e969e37e..821bb6ac 100644 --- a/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift @@ -82,26 +82,26 @@ public enum SpanishKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "'", "¿", "delete"], - [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "'", "+", "*"], + ["|", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "?", "¿", "delete"], + [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "´", "+", "*"], [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "ñ", "{", "}", "return"], - ["shift", "|", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + ["shift", "'", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let letterKeysPadExpandedDisableAccents = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "'", "¿", "delete"], - [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "'", "+", "*"], - [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "{", "}", "return"], - ["shift", "|", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + ["|", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "?", "¿", "delete"], + [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "´", "+", "*"], + [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "~", "{", "}", "return"], + ["shift", "'", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "§"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.indent, "(", ")", "{", "}", "#", "%", "^", "*", "+", "=", "\\", "|", "§"], + [SpecialKeys.capsLock, "—", "/", ":", ";", "&", "@", "$", "£", "¥", "~", "[", "]", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "_", "€", ",", ".", "-", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift index e5ac923d..c8246794 100644 --- a/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift @@ -84,26 +84,26 @@ public enum SwedishKeyboardConstants { // Expanded iPad keyboard layouts for wider devices. static let letterKeysPadExpanded = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "'", "delete"], + ["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "´", "delete"], [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "^", "*"], [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "'", "return"], - ["shift", "<", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + ["shift", "'", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let letterKeysPadExpandedDisableAccents = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "'", "delete"], - [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "^", "*"], - [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "'", "return"], - ["shift", "<", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], + ["§", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "+", "´", "delete"], + [SpecialKeys.indent, "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "\"", "^", "*"], + [SpecialKeys.capsLock, "a", "s", "d", "f", "g", "h", "j", "k", "l", "(", ")", "'", "return"], + ["shift", "'", "z", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "microphone", "scribble" ] static let symbolKeysPadExpanded = [ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "<", ">", "delete"], - [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "\"", "|", "§"], - [SpecialKeys.capsLock, "-", "/", ":", ";", "(", ")", "$", "&", "@", "£", "¥", "~", "return"], // "undo" - ["shift", "...", ".", ",", "?", "!", "'", "\"", "_", "€", "shift"], // "redo" + [SpecialKeys.indent, "[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "°", "|", "§"], + [SpecialKeys.capsLock, "—", "/", ":", ";", "(", ")", "&", "@", "$", "£", "¥", "~", "return"], // "undo" + ["shift", "…", "?", "!", "≠", "'", "\"", "_", "€", ",", ".", "-", "shift"], // "redo" ["selectKeyboard", "ABC", "space", "ABC", "hideKeyboard"], // "microphone", "scribble" ] diff --git a/Scribe/SettingsTab/SettingsViewController.swift b/Scribe/SettingsTab/SettingsViewController.swift index e9fc6f9c..eb1cf445 100644 --- a/Scribe/SettingsTab/SettingsViewController.swift +++ b/Scribe/SettingsTab/SettingsViewController.swift @@ -127,6 +127,16 @@ extension SettingsViewController: UITableViewDelegate { if let viewController = storyboard?.instantiateViewController(identifier: "TableViewTemplateViewController") as? TableViewTemplateViewController { // Copy base settings var data = SettingsTableData.languageSettingsData + + // Check if the device is an iPad, and if so don't show the option to put a period and comma on the ABC characters. + let periodCommaOptionIndex = SettingsTableData.languageSettingsData[0].section.firstIndex(where: { + s in s.sectionTitle.elementsEqual("Period and comma on ABC") + }) ?? -1 + + if DeviceType.isPad { + let periodCommaSettings = data[0].section.remove(at: periodCommaOptionIndex) + print(periodCommaSettings) + } // Languages where we can disable accent keys. let accentKeyLanguages: [String] = ["Swedish", "German", "Spanish"]