resolved keyboard error after flashing gapps
1. unzip rom in your pc
2. Copy /system/app/LatinIME.apk from the CM11 archive to /system/app on your device (with ES File Explorer via its Root Explorer option, through ADB, or whatever you prefer). Set its permissions to 0644 (owner read and write, group read, others read).
3. Copy /system/lib/libjni_latinime.so from the Google Apps archive to /system/lib on your device and set its permissions to 0644.
4. Reboot your device.
5. Enable the keyboard and set it as default.