xref: /qemu/docs/interop/vnc-ledstate-pseudo-encoding.rst (revision d88ce91299053c437f42d22ab5b9e7adbd2cc2a7)
1*7504ae69SLei LiVNC LED state Pseudo-encoding
2*7504ae69SLei Li=============================
3*7504ae69SLei Li
4*7504ae69SLei LiIntroduction
5*7504ae69SLei Li------------
6*7504ae69SLei Li
7*7504ae69SLei LiThis document describes the Pseudo-encoding of LED state for RFB which
8*7504ae69SLei Liis the protocol used in VNC as reference link below:
9*7504ae69SLei Li
10*7504ae69SLei Lihttp://tigervnc.svn.sourceforge.net/viewvc/tigervnc/rfbproto/rfbproto.rst?content-type=text/plain
11*7504ae69SLei Li
12*7504ae69SLei LiWhen accessing a guest by console through VNC, there might be mismatch
13*7504ae69SLei Libetween the lock keys notification LED on the computer running the VNC
14*7504ae69SLei Liclient session and the current status of the lock keys on the guest
15*7504ae69SLei Limachine.
16*7504ae69SLei Li
17*7504ae69SLei LiTo solve this problem it attempts to add LED state Pseudo-encoding
18*7504ae69SLei Liextension to VNC protocol to deal with setting LED state.
19*7504ae69SLei Li
20*7504ae69SLei LiPseudo-encoding
21*7504ae69SLei Li---------------
22*7504ae69SLei Li
23*7504ae69SLei LiThis Pseudo-encoding requested by client declares to server that it supports
24*7504ae69SLei LiLED state extensions to the protocol.
25*7504ae69SLei Li
26*7504ae69SLei LiThe Pseudo-encoding number for LED state defined as:
27*7504ae69SLei Li
28*7504ae69SLei Li======= ===============================================================
29*7504ae69SLei LiNumber  Name
30*7504ae69SLei Li======= ===============================================================
31*7504ae69SLei Li-261    'LED state Pseudo-encoding'
32*7504ae69SLei Li======= ===============================================================
33*7504ae69SLei Li
34*7504ae69SLei LiLED state Pseudo-encoding
35*7504ae69SLei Li--------------------------
36*7504ae69SLei Li
37*7504ae69SLei LiThe LED state Pseudo-encoding describes the encoding of LED state which
38*7504ae69SLei Liconsists of 3 bits, from left to right each bit represents the Caps, Num,
39*7504ae69SLei Liand Scroll lock key respectively. '1' indicates that the LED should be
40*7504ae69SLei Lion and '0' should be off.
41*7504ae69SLei Li
42*7504ae69SLei LiSome example encodings for it as following:
43*7504ae69SLei Li
44*7504ae69SLei Li======= ===============================================================
45*7504ae69SLei LiCode    Description
46*7504ae69SLei Li======= ===============================================================
47*7504ae69SLei Li100     CapsLock is on, NumLock and ScrollLock are off
48*7504ae69SLei Li010     NumLock is on, CapsLock and ScrollLock are off
49*7504ae69SLei Li111     CapsLock, NumLock and ScrollLock are on
50*7504ae69SLei Li======= ===============================================================
51