Merge HYJ's keyboard code