Browse Source

SDLvncviewer: work around SDL_TEXTINPUT not generating chars with CTRL down

pull/3/head
Christian Beier 4 years ago
parent
commit
474f64e5db
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8
  1. 4
      client_examples/SDLvncviewer.c

4
client_examples/SDLvncviewer.c

@ -175,6 +175,10 @@ static rfbKeySym SDL_key2rfbKeySym(SDL_KeyboardEvent* e) {
case SDLK_SYSREQ: k = XK_Sys_Req; break;
default: break;
}
/* SDL_TEXTINPUT does not generate characters if ctrl is down, so handle those here */
if (k == 0 && sym > 0x0 && sym < 0x100 && e->keysym.mod & KMOD_CTRL)
k = sym;
return k;
}

Loading…
Cancel
Save