Change linux bridge to use KeyPress events instead of KeyRelease

This commit is contained in:
Federico Terzi 2019-09-15 15:10:48 +02:00
parent 1181ac9beb
commit a409896c77

View File

@ -183,7 +183,7 @@ void event_callback(XPointer p, XRecordInterceptData *hook)
int res = XLookupString(&event, buffer.data(), buffer.size(), NULL, NULL); int res = XLookupString(&event, buffer.data(), buffer.size(), NULL, NULL);
switch (event_type) { switch (event_type) {
case KeyRelease: case KeyPress:
//printf ("%d %d %s\n", key_code, res, buffer.data()); //printf ("%d %d %s\n", key_code, res, buffer.data());
if (res > 0 && key_code != 22) { // Printable character, but not backspace if (res > 0 && key_code != 22) { // Printable character, but not backspace
keypress_callback(context_instance, buffer.data(), buffer.size(), 0, key_code); keypress_callback(context_instance, buffer.data(), buffer.size(), 0, key_code);