modular implementation of  double semantics of keyboard keys in depence of duration and multiple key combinations