# VNC/x11vnc repeats charactors input

## clouds222

I use vnc viewer 4 to connect to remote gnome desktop, but some times there's a problem pulsed me.

Sometimes when I input a charactor, it auto repeat the input with out stop, even I press the esc key, I can't stop it.

Did some one ever encountered the same problem? I don't know how to fix it.

----------

## papahuhn

This may occur when vnc has missed the keyrelease event. What happens if you press the said key again and release it then?

----------

## clouds222

It do nothing when press the said key again. 

I tried to disable the key repeat option in gnome-keyboard-properity. I don't know if this can resolve the problem.

----------

## krunge

Are you seeing this problem?

http://ubuntuforums.org/showthread.php?t=1125694

There are a number of workarounds discussed there.

----------

## eccerr0r

I've seen this happen before and had to basically restart the remote X server because I have no access to the remote console to hit the offending key.

The suggestions posted on the x11vnc site:

```
   x11vnc -R clear_mods

   x11vnc -R clear_keys

   x11vnc -R clear_locks

   x11vnc -R clear_all

```

don't always work.

Not sure if there's a way to actually tell the remote X server that "all buttons are currently released" or something... or perhaps something that can be fed into /dev/input... hmm...

----------

## krunge

So running x11vnc with the '-repeat' option from the start didn't avoid the key-repeating problem?

BTW, which version of x11vnc are you running?  It tries to automatically work around in this problem in version 0.9.8 and later.

----------

## eccerr0r

Looks like x11-misc/x11vnc-0.9.6 is the stable version in portage, perhaps a later version needs to be stabilized?

weird, thought earlier versions including 0.9.6 tries to disable key repeat, must be a different issue worked around...

----------

## krunge

 *eccerr0r wrote:*   

> Looks like x11-misc/x11vnc-0.9.6 is the stable version in portage, perhaps a later version needs to be stabilized?
> 
> weird, thought earlier versions including 0.9.6 tries to disable key repeat, must be a different issue worked around...

 

Yes, for a very long time x11vnc's default has been to disable key-repeating in the X server when VNC viewers are connected.

The problem here is different.  After 5 minutes of idle keyboard activity from the VNC viewer, x11vnc will re-enable keyrepeating in the X server, and then deactivates keyrepeating when the Viewer starts typing again.  This has worked fine for years, but now there is a bug in GNOME (I think a11y) if x11vnc deactivates keyrepeating with any key down GNOME somehow makes the key repeat forever.  Evidently with KDE the problem doesn't appear.

So it is x11vnc 0.9.8 and later that try to work around this GNOME bug.  All it does is make sure all of the keys are up before deactivating keyrepeat.

----------

