custom keyboard handler, fix shortcuts