Made some functions in key_data object take const input since they produce const output.
Implement not_exists(), use it in processKeyState(). Implement rule1() and outline rule2()/rule3().
Document key state marks for rule1() and implement good key state for rule2() and rule3().