Added support for preventing specific direction by key handler.