diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae6ab34..198d88b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,8 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/). ### ✨ Features - - Adds comma-space to letter keys functionality. - +- Adds comma-space to letter keys functionality. +- Adds question mark and exclamation point followed by space to capital letter keys functionality. ### 🎨 Design diff --git a/Keyboards/KeyboardsBase/KeyboardViewController.swift b/Keyboards/KeyboardsBase/KeyboardViewController.swift index 917b57e1..821f672b 100644 --- a/Keyboards/KeyboardsBase/KeyboardViewController.swift +++ b/Keyboards/KeyboardsBase/KeyboardViewController.swift @@ -1263,11 +1263,27 @@ class KeyboardViewController: UIInputViewController { if proxy.documentContextBeforeInput?.suffix(2) == ", " { changeKeyboardToLetterKeys() } + if proxy.documentContextBeforeInput?.suffix(2) == "? " { + shiftButtonState = .shift + changeKeyboardToLetterKeys() + } + if proxy.documentContextBeforeInput?.suffix(2) == "! " { + shiftButtonState = .shift + changeKeyboardToLetterKeys() + } } else { previewBar?.text! = (previewBar?.text!.insertPriorToCursor(char: " "))! if previewBar?.text!.suffix(3) == ", " + previewCursor { changeKeyboardToLetterKeys() } + if previewBar?.text!.suffix(3) == "? " + previewCursor { + shiftButtonState = .shift + changeKeyboardToLetterKeys() + } + if previewBar?.text!.suffix(3) == "! " + previewCursor { + shiftButtonState = .shift + changeKeyboardToLetterKeys() + } } typedNounAnnotation() typedPrepositionAnnotation()