Fixed a internal bug in Input subsystem.

[ENH] Simplify the bindings of keys.
[FIX] Fixed the wrong detection of triggered keys.
[DEL] Removed useless local variable in main.lua.