xref: /openbmc/qemu/docs/interop/vnc-ledstate-pseudo-encoding.rst (revision aa96ab7c9df59c615ca82b49c9062819e0a1c287)
1*d88ce912SThomas HuthVNC LED state Pseudo-encoding
2*d88ce912SThomas Huth=============================
3*d88ce912SThomas Huth
4*d88ce912SThomas HuthIntroduction
5*d88ce912SThomas Huth------------
6*d88ce912SThomas Huth
7*d88ce912SThomas HuthThis document describes the Pseudo-encoding of LED state for RFB which
8*d88ce912SThomas Huthis the protocol used in VNC as reference link below:
9*d88ce912SThomas Huth
10*d88ce912SThomas Huthhttp://tigervnc.svn.sourceforge.net/viewvc/tigervnc/rfbproto/rfbproto.rst?content-type=text/plain
11*d88ce912SThomas Huth
12*d88ce912SThomas HuthWhen accessing a guest by console through VNC, there might be mismatch
13*d88ce912SThomas Huthbetween the lock keys notification LED on the computer running the VNC
14*d88ce912SThomas Huthclient session and the current status of the lock keys on the guest
15*d88ce912SThomas Huthmachine.
16*d88ce912SThomas Huth
17*d88ce912SThomas HuthTo solve this problem it attempts to add LED state Pseudo-encoding
18*d88ce912SThomas Huthextension to VNC protocol to deal with setting LED state.
19*d88ce912SThomas Huth
20*d88ce912SThomas HuthPseudo-encoding
21*d88ce912SThomas Huth---------------
22*d88ce912SThomas Huth
23*d88ce912SThomas HuthThis Pseudo-encoding requested by client declares to server that it supports
24*d88ce912SThomas HuthLED state extensions to the protocol.
25*d88ce912SThomas Huth
26*d88ce912SThomas HuthThe Pseudo-encoding number for LED state defined as:
27*d88ce912SThomas Huth
28*d88ce912SThomas Huth======= ===============================================================
29*d88ce912SThomas HuthNumber  Name
30*d88ce912SThomas Huth======= ===============================================================
31*d88ce912SThomas Huth-261    'LED state Pseudo-encoding'
32*d88ce912SThomas Huth======= ===============================================================
33*d88ce912SThomas Huth
34*d88ce912SThomas HuthLED state Pseudo-encoding
35*d88ce912SThomas Huth--------------------------
36*d88ce912SThomas Huth
37*d88ce912SThomas HuthThe LED state Pseudo-encoding describes the encoding of LED state which
38*d88ce912SThomas Huthconsists of 3 bits, from left to right each bit represents the Caps, Num,
39*d88ce912SThomas Huthand Scroll lock key respectively. '1' indicates that the LED should be
40*d88ce912SThomas Huthon and '0' should be off.
41*d88ce912SThomas Huth
42*d88ce912SThomas HuthSome example encodings for it as following:
43*d88ce912SThomas Huth
44*d88ce912SThomas Huth======= ===============================================================
45*d88ce912SThomas HuthCode    Description
46*d88ce912SThomas Huth======= ===============================================================
47*d88ce912SThomas Huth100     CapsLock is on, NumLock and ScrollLock are off
48*d88ce912SThomas Huth010     NumLock is on, CapsLock and ScrollLock are off
49*d88ce912SThomas Huth111     CapsLock, NumLock and ScrollLock are on
50*d88ce912SThomas Huth======= ===============================================================
51