<commit_before>//
//  KeyboardAction+Deprecated.swift
//  KeyboardKit
//
//  Created by <NAME> on 2020-05-05.
//  Copyright © 2020 <NAME>. All rights reserved.
//

import UIKit

public extension KeyboardAction {

    @available(*, deprecated, renamed: "nextKeyboard")
    static var switchKeyboard: KeyboardAction { .nextKeyboard }
    
    @available(*, deprecated, renamed: "keyboardType")
    static func switchToKeyboard(_ type: KeyboardType) -> KeyboardAction { .keyboardType(type) }
    
    @available(*, deprecated, renamed: "standardTapAction")
    var standardInputViewControllerAction: ((KeyboardInputViewController?) -> Void)? {
        standardTapAction
    }
    
    @available(*, deprecated, renamed: "standardTapAction")
    var standardTextDocumentProxyAction: ((UITextDocumentProxy?) -> Void)? {
        switch self {
        case .backspace: return { $0?.deleteBackward() }
        case .character(let char): return { $0?.insertText(char) }
        case .moveCursorBackward: return { $0?.adjustTextPosition(byCharacterOffset: -1) }
        case .moveCursorForward: return { $0?.adjustTextPosition(byCharacterOffset: 1) }
        case .newLine: return { $0?.insertText("\n") }
        case .space: return { $0?.insertText(" ") }
        case .tab: return { $0?.insertText("\t") }
        default: return nil
        }
    }
}<commit_msg>Make deprecated functions call the new ones<commit_after>//
//  KeyboardAction+Deprecated.swift
//  KeyboardKit
//
//  Created by <NAME> on 2020-05-05.
//  Copyright © 2020 <NAME>. All rights reserved.
//

import UIKit

public extension KeyboardAction {

    @available(*, deprecated, renamed: "nextKeyboard")
    static var switchKeyboard: KeyboardAction { .nextKeyboard }
    
    @available(*, deprecated, renamed: "keyboardType")
    static func switchToKeyboard(_ type: KeyboardType) -> KeyboardAction { .keyboardType(type) }
    
    @available(*, deprecated, renamed: "standardTapActionForController")
    var standardInputViewControllerAction: ((KeyboardInputViewController?) -> Void)? {
        standardTapActionForController
    }
    
    @available(*, deprecated, renamed: "standardTapActionForProxy")
    var standardTextDocumentProxyAction: ((UITextDocumentProxy?) -> Void)? {
        standardTapActionForProxy
    }
}
{'fraction_non_alphanumeric': 0.12456293706293706, 'fraction_numerical': 0.014423076923076924, 'mean_word_length': 3.5237154150197627, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6719527', 'n_tokens_mistral': 677, 'n_tokens_neox': 639, 'n_words': 157}