# Xvnc



## venoom27 (Sep 22, 2022)

I am running x11vnc 0.9.16.2 on a bsd 13.1 desktop with KDE. When I connect to it through x11vnc the left and down arrow will not repeat when I press and hold them down but the up and right arrows will repeat when held down. They all work when I am physically on the computer holding down the keys. Anyone have any idea why and how I can fix this with x11vnc?


----------



## kpedersen (Sep 22, 2022)

You want to pass the `-repeat` argument when you run it.

For some reason it defaults to `-norepeat`


```
-norepeat, -repeat

Option -norepeat disables X server key auto repeat when
VNC clients are connected and VNC keyboard input is not idle for more than 5 minutes. This works around a repeating keystrokes bug (triggered by long processing delays between key down and key up client events: either from large screen changes or high latency). Default: -norepeat
You can set the env. var. X11VNC_IDLE_TIMEOUT to the
number of idle seconds you want (5min = 300secs).
Note: your VNC viewer side will likely do autorepeating,
so this is no loss unless someone is simultaneously at the real X display.
Use "-norepeat N" to set how many times norepeat will
be reset if something else (e.g. X session manager) undoes it. The default is 2. Use a negative value for unlimited resets.
```

https://linux.die.net/man/1/x11vnc


----------



## venoom27 (Sep 22, 2022)

Repeat works on all other keys but for the down arrow and left arrow. 
Here is what I am running.


> x11vnc -display :0 -auth /home/john/.Xauthority -repeat -display :0 -loop -passwdfile -o ~/x11vnc.log -noxdamage -forever -bg -xkb -noxrecord -norc -nevershared


----------



## zsolt (Sep 23, 2022)

This is mine (pressing keyboard on all directions works): x11vnc -display :0 -shared -repeat -forever -no6 -listen 192.168.x.x &


----------



## kpedersen (Sep 23, 2022)

Possibly another solution could be to use the x0vncserver from tigervnc. It provides a similar function (scraping an existing X11 server).


----------



## venoom27 (Sep 23, 2022)

zsolt said:


> This is mine (pressing keyboard on all directions works): x11vnc -display :0 -shared -repeat -forever -no6 -listen 192.168.x.x &


I tried your code with no success. Left and down arrows still will not repeat.  It’s weird because I have used this code on Linux boxes with no issues.


----------



## venoom27 (Sep 23, 2022)

kpedersen said:


> Possibly another solution could be to use the x0vncserver from tigervnc. It provides a similar function (scraping an existing X11 server).


Tried x0vncserver and the left and down arrow keys will set not repeat but the up and right arrows keys will repeat. I have never seen this before. It’s usually all or nothing. Could it be my
Desktop environment causing it with a hot key blocking the repeat?  I am using kde.


----------



## kpedersen (Sep 23, 2022)

venoom27 said:


> Desktop environment causing it with a hot key blocking the repeat?  I am using kde.


Hmm, I don't recall it being an issue but I rarely use arrow keys. Yes, perhaps try just launching xterm (or twm) in your .xinitrc.


----------



## venoom27 (Sep 23, 2022)

kpedersen said:


> Hmm, I don't recall it being an issue but I rarely use arrow keys. Yes, perhaps try just launching xterm (or twm) in your .xinitrc.


It only happens through vnc. I installed xrdp and ran a session in xorg and it was fine.


----------



## venoom27 (Sep 24, 2022)

I guess I will just run Remote Desktop instead since all the keys work as I want them through xrdp. It’s just weird that this is an issue since I have never encountered where only two keys behave differently through vnc.


----------



## kpedersen (Sep 25, 2022)

Yeah it is a little odd.

How about X11/ssh forwarding as another option?


----------



## venoom27 (Sep 25, 2022)

kpedersen said:


> Yeah it is a little odd.
> 
> How about X11/ssh forwarding as another option?


----------



## venoom27 (Sep 25, 2022)

Could but I wasn’t really wanting to go that way but thanks for the suggestion.


----------

