aligrudi / fbvnc

A small Linux framebuffer VNC viewer
26 stars 7 forks source link

Some keyboard keys do not work #3

Open vmsh0 opened 2 years ago

vmsh0 commented 2 years ago

Sometimes, some keys or keystrokes are not registered or registered wrong in the target VNC system. For example, when writing in a text field over the VNC connection, Shift-2 correctly produces the " symbol, while Shift-3 only produces a 3 (instead of a £). Another example is that the Windows key doesn't work.

I am using an Italian ISO keyboard. The console where fbvnc is used has the right keymappings loaded. The target operating system is Windows 2000 virtualized on QEMU. Both on the QEMU VNC server and on Windows, I have set the Italian keyboard map.

I am not sure whether this is a problem of the client or the server.

aligrudi commented 2 years ago

Riccardo Paolo Bestetti @.***> wrote:

Sometimes, some keys or keystrokes are not registered or registered wrong in the target VNC system. For example, when writing in a text field over the VNC connection, Shift-2 correctly produces the " symbol, while Shift-3 only produces a 3 (instead of a £). Another example is that the Windows key doesn't work.

I am using an Italian ISO keyboard. The console where fbvnc is used has the right keymappings loaded. The target operating system is Windows 2000 virtualized on QEMU. Both on the QEMU VNC server and on Windows, I have set the Italian keyboard map.

I am not sure whether this is a problem of the client or the server.

There are two issues (see kbd_event in fbvnc.c): reading the key, and sending the key using the RFB protocol. For the former there is usually no problem; the main challenge is that some key presses result in more than one character (for instance the up arrow is translated into Ctrl-[ [ A). For the latter, it is necessary to find out the matching key code in the RFB protocol (if it is supported).

Ali