Fixing keys handling and keys code decoding

Some window managers may catch keys in weird manner.
So only Keys.remove() will be called. It will cause exception.