From 2530c5fa4cc468207180329c79fc74a0fa4e016d Mon Sep 17 00:00:00 2001 From: dscho Date: Sat, 2 Feb 2008 03:56:41 +0000 Subject: [PATCH] SDLvncviewer: fix Ctrl+ Signed-off-by: Johannes Schindelin --- TODO | 1 - client_examples/SDLvncviewer.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index cef1823..8b1dd69 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,6 @@ immediate: Implement ZYWRLE decoding in libvncclient make SDLvncviewer more versatile (test for missing keys, introduce scrollbars, make scrollable with 2xCtrl and mouse drag) - - Left Ctrl + A does not work - 2nd and 3rd mouse button are switched Clean up ZRLE (probably not thread-safe: zrleBeforeBuf, zrlePaletteHelper) style fixes: use Linux' coding guidelines & ANSIfy tightvnc-filetransfer: diff --git a/client_examples/SDLvncviewer.c b/client_examples/SDLvncviewer.c index 64f0f56..4154887 100644 --- a/client_examples/SDLvncviewer.c +++ b/client_examples/SDLvncviewer.c @@ -130,6 +130,11 @@ static rfbKeySym SDL_key2rfbKeySym(SDL_KeyboardEvent* e) { case SDLK_BREAK: k = XK_Break; break; default: break; } + if (k == 0 && e->keysym.sym >= SDLK_a && e->keysym.sym <= SDLK_z) { + k = XK_a + e->keysym.sym - SDLK_a; + if (e->keysym.mod & (KMOD_LSHIFT | KMOD_RSHIFT)) + k &= ~0x20; + } if (k == 0) { if (e->keysym.unicode < 0x100) k = e->keysym.unicode;