FEAT: added a buffer to avoid flickering in INPUT.

FEAT: code refactoring for input.red
FIX: now search combining-table correctly.