Fixing up key input