implemented scancode decoding