copy from SimpleKeyBoard