         button.titleLabel?.font = buttonFont
         button.addTarget(self,
                          action: #selector(buttonInput(button:)),
-                            for: .touchUpInside);
+                         for: .touchUpInside)
         button.addTarget(self,
                          action: #selector(buttonPlayClick(button:)),
-                            for: .touchDown);
+                         for: .touchDown)
         return button
     }
     
-
-     func buttonInput(button:BJKeyboardButton){
-        
+    func buttonInput(button:BJKeyboardButton){
         keyInput = findKeyInput()
         if keyInput == nil{
             return
         }
-        
         if button.style == .BJKeyboardButtonStyleProvince ||
-           button.style == .BJKeyboardButtonStyleLetter{
+            button.style == .BJKeyboardButtonStyleLetter{
             keyInput?.insertText((button.titleLabel?.text)!)
         }else if button.style == .BJKeyboardButtonStyleDelegate{
             keyInput?.deleteBackward()

extension UIResponder{
    
    func BJFindFirstResponder(sender:Any){
        currentFirstResponder = self;
    }
    
    class func BJCurrentFirstResponder() -> (UIResponder){
        currentFirstResponder = nil
        UIApplication.shared.sendAction(#selector(BJFindFirstResponder(sender:)), to: nil, from: nil, for: nil)
        return currentFirstResponder!;
    }
}

public class BJNumberPlate: UIInputView,UIInputViewAudioFeedback {
    
    enum BJKeyboardStyle {
        case BJKeyboardStyleProvince
        case BJKeyboardStyleLetter
    }
    
    private let pArray = ["京","沪","津","渝","冀","晋","辽",
                          "吉","黑","苏","浙","皖","闽","赣",
                          "鲁","豫","鄂","湘","粤","琼","川",

                j = 3
            }
            if index < 20{
                btn.frame = CGRect(x:kKeyHorizontalSpace + CGFloat(k)*(width!/10),
                                   y:toolBarViewHeight+kKeyVerticalSpace + CGFloat(j)*(height! / 4),
                                   width:KeyWidth,
                                   height:KeyHeight)
            }else if index < buttonCount{
                btn.frame  = CGRect(x:kKeyHorizontalSpace + (CGFloat(k+1)-CGFloat(tempW)) * (width!/10.0),
                                    y:toolBarViewHeight+kKeyVerticalSpace + CGFloat(j)*(height!/4),
                                    width:KeyWidth,
                                    height:KeyHeight)
                
            }else{
                btn.frame = CGRect(x:kKeyHorizontalSpace + (CGFloat(k+2)-CGFloat(tempW))*(width!/10),
                                   y:toolBarViewHeight+kKeyVerticalSpace + CGFloat(j)*(height!/4),
                                   width:KeyWidth,
                                   height:KeyHeight)
