diff options
author | runge <runge> | 2007-01-31 15:41:42 +0000 |
---|---|---|
committer | runge <runge> | 2007-01-31 15:41:42 +0000 |
commit | 1b9082bc8739e5ab186092ca1dcff1736eb91c0e (patch) | |
tree | 9d2a267bcbba93aed87634838c9ac10f36363210 /x11vnc/keyboard.c | |
parent | 1f8da9bde3b7de272228872410143f076662ae13 (diff) | |
download | libtdevnc-1b9082bc8739e5ab186092ca1dcff1736eb91c0e.tar.gz libtdevnc-1b9082bc8739e5ab186092ca1dcff1736eb91c0e.zip |
x11vnc: -reflect, -N. -ncache, FINDDISPLAY, FINDCREATEDISPLAY, improvements. MODTWEAK_LOWEST workaround.
Diffstat (limited to 'x11vnc/keyboard.c')
-rw-r--r-- | x11vnc/keyboard.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |