int keysym = toKeySym(keycode, location);
for (int code=5;code < 256;code++) {
int idx = code / 8;
int shift = code % 8;
if ((keys[idx] & (1 << shift)) != 0) {
int sym = lib.XKeycodeToKeysym(dpy, (byte)code, 0).intValue();
if (sym == keysym)
return true;
}
}
}