diff options
author | runge <runge> | 2006-07-11 18:20:23 +0000 |
---|---|---|
committer | runge <runge> | 2006-07-11 18:20:23 +0000 |
commit | 0abd329d6a8dd17b6d0cd28a8f49607c3b03af45 (patch) | |
tree | c4548deb3da9b993ab177f9e756413d086a08d08 /x11vnc/keyboard.c | |
parent | 0afa1da8cc33e663a1d4162290595d14bbaf197e (diff) | |
download | libtdevnc-0abd329d6a8dd17b6d0cd28a8f49607c3b03af45.tar.gz libtdevnc-0abd329d6a8dd17b6d0cd28a8f49607c3b03af45.zip |
x11vnc: more UINPUT mode tweaks.
Diffstat (limited to 'x11vnc/keyboard.c')
-rw-r--r-- | x11vnc/keyboard.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/x11vnc/keyboard.c b/x11vnc/keyboard.c index eb51d6d..bd2a2f6 100644 --- a/x11vnc/keyboard.c +++ b/x11vnc/keyboard.c @@ -2631,6 +2631,7 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { static rfbKeySym last_keysym = NoSymbol; static rfbKeySym max_keyrepeat_last_keysym = NoSymbol; static double max_keyrepeat_last_time = 0.0; + static double max_keyrepeat_always = -1.0; dtime0(&tnow); got_keyboard_calls++; @@ -2645,6 +2646,7 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { unixpw_in_progress, tnow - x11vnc_start); } + if (keysym <= 0) { rfbLog("keyboard: skipping 0x0 keysym\n"); return; @@ -2768,6 +2770,18 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { } } +#ifdef MAX_KEYREPEAT + if (max_keyrepeat_always < 0.0) { + if (getenv("MAX_KEYREPEAT")) { + max_keyrepeat_always = atof(getenv("MAX_KEYREPEAT")); + } else { + max_keyrepeat_always = 0.0; + } + } + if (max_keyrepeat_always > 0.0) { + max_keyrepeat_time = max_keyrepeat_always; + } +#endif if (!down && skipped_last_down) { int db = debug_scroll; if (keysym == max_keyrepeat_last_keysym) { |