made keymapping a global variable