  the photo album. This is already taken care of in this demo
  app, so you can just copy the setup into your own app.
  
- The keyboard is setup in `viewDidAppear(...)` since this is
- when `needsInputModeSwitchKey` first gets the correct value.
- Before this point, the value is `true` even if it should be
- `false`. If you find a way to solve this bug, you can setup
- the keyboard earlier.
- 
- The autocomplete parts of this class is the first iteration
- of autocomplete support in KeyboardKit. The intention is to
- move these parts to `KeyboardInputViewController` and a new
- api for working with autocomplete.
+ This demo keyboard also has a topmost auto complete toolbar
+ that displays dummy suggestions for the current word.
  */
 class KeyboardViewController: KeyboardInputViewController {
     

    lazy var autocompleteToolbar: AutocompleteToolbar = {
        AutocompleteToolbar(textDocumentProxy: textDocumentProxy)
    }()
    
    
    // MARK: - Functions
    
    override func setupKeyboard() {
        setupKeyboard(for: view.bounds.size)
    }
    
    func switchKeyboardType(to type: KeyboardType){
        DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
            self.changeKeyboardType(to: type)
        }
    }
}

import KeyboardKit

/**
 This demo keyboard handles system actions as normal (change
 keyboard, space, new line etc.), injects strings and emojis
 into the text proxy, copies tapped images to the pasteboard
 and saves long pressed images to the user's photo album.
 
 IMPORTANT: To use this demo keyboard, you have to enable it
 in system settings ("Settings/General/Keyboards") then give
