From 1b9082bc8739e5ab186092ca1dcff1736eb91c0e Mon Sep 17 00:00:00 2001 From: runge Date: Wed, 31 Jan 2007 15:41:42 +0000 Subject: x11vnc: -reflect, -N. -ncache, FINDDISPLAY, FINDCREATEDISPLAY, improvements. MODTWEAK_LOWEST workaround. --- x11vnc/keyboard.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'x11vnc/keyboard.c') diff --git a/x11vnc/keyboard.c b/x11vnc/keyboard.c index 29aa9f4..5f16a78 100644 --- a/x11vnc/keyboard.c +++ b/x11vnc/keyboard.c @@ -2235,6 +2235,7 @@ void initialize_modtweak(void) { #else KeySym keysym, *keymap; int i, j, minkey, maxkey, syms_per_keycode; + int use_lowest_index = 0; if (use_xkb_modtweak) { initialize_xkb_modtweak(); @@ -2247,6 +2248,10 @@ void initialize_modtweak(void) { RAWFB_RET_VOID + if (getenv("MODTWEAK_LOWEST")) { + use_lowest_index = 1; + } + X_LOCK; XDisplayKeycodes(dpy, &minkey, &maxkey); @@ -2306,6 +2311,9 @@ void initialize_modtweak(void) { keysym = keymap[ (i - minkey) * syms_per_keycode + j ]; if ( keysym >= ' ' && keysym < 0x100 && i == XKeysymToKeycode(dpy, keysym) ) { + if (use_lowest_index && keycodes[keysym] != NoSymbol) { + continue; + } keycodes[keysym] = i; modifiers[keysym] = j; } @@ -2555,6 +2563,8 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { uinput_key_command(down, keysym, client); } else if (pipeinput_int == PIPEINPUT_MACOSX) { macosx_key_command(down, keysym, client); + } else if (pipeinput_int == PIPEINPUT_VNC) { + vnc_reflect_send_key((uint32_t) keysym, down); } if (pipeinput_fh == NULL) { return; -- cgit v1.1