Fix issue #90

Fixes a problem due to Xorg bug
https://bugs.freedesktop.org/show_bug.cgi?id=7430
and similar problems where pressing and releasing a key
generates two different keysym in Xorg.