qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lei Li <lilei@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: lagarcia@br.ibm.com, aliguori@us.ibm.com,
	Lei Li <lilei@linux.vnet.ibm.com>
Subject: [Qemu-devel] Support for VNC LED state extension proposal
Date: Mon,  8 Apr 2013 21:07:34 +0800	[thread overview]
Message-ID: <1365426454-6723-1-git-send-email-lilei@linux.vnet.ibm.com> (raw)

Hi,

This proposal aims to add support for VNC LED state extension to
Qemu VNC server. It also contains the proposal of this VNC extension,
althrough it should be sent to some other mailing, but we'd like to
send to Qemu mailing list first to have your suggestion. Please
let me know your ideas and thoughts.

When access a guest by console through VNC, there might be
mismatch between the lock keys notification LED on the computer
running the VNC client session and the current status of the lock
keys on the guest machine. This happens because the VNC protocol
does not have any support to deal with setting led state.

To solve this, we plan to:
1) Add LED state extension to VNC proposal (As the description in
   'Proposal for adding LED state extensions to VNC protocol').

2) Support VNC LED state extension in Qemu.

The general flow is:
   
1) A client that supports the LED state extension starts by requesting
   the led flags Psuedo-encoding.

2) Server then send a message to the client with the current LED state
   if this extension is supported.

3) Clinet receive this message and sync with server by setting the local
   LED state.

4) Everytime the LED state is changed, server will send an update of the
   current LED state to client, and client will resync with server.

For instance, if the change of LED state is requested from remote client
through VNC, client will send scancode to VNC server (This is base on the
extension 'QEMU Extended Key Event Message' Anthony have already added to
VNC protocol as reference link below), server pass the scancode to OS/X11
and then OS/X11 handle the setting of keyboard LED. After the setting
job, server receive the LED state event from OS/X11, will send current LED state
message to client. Then, client will resync the LED state with server
based on this message by setting the local LED state.

http://tigervnc.svn.sourceforge.net/viewvc/tigervnc/rfbproto/rfbproto.rst?content-type=text/plain
   

------

Proposal for adding LED state extensions to VNC protocol

QEMU LED state extension Psuedo-encoding
----------------------------------------

A client that supports the LED extension starts by requesting the led
flags pseudo-encoding declaring that it is capable of accepting the
`QEMU LED state extensions Server Message`_. The server, in turn, will
send the current led flags in an update `FrameBufferUpdate`_ with the
matching psuedo-encoding and the *num-rectangles* field set to 1, however,
no rectangles will actually be sent. After sending this notification,
server will update the led flags everytime the led state is changed in
the update, client could resync the led state with the server by setting
the local led state accordingly.

=========================== =================== =======================
No. of bytes                Type                Description
=========================== =================== =======================
1                           ``U8``              *led-flags*
=========================== =================== =======================

The example psuedo-encodings for *led-flags* defined as following:

======= ===============================================================
Code    Description
======= ===============================================================
100     CapsLock is set
010     NumLock is set
001     ScrollLock is set
110     CapsLock and NumLock are set
111     CapsLock, NumLock and ScrollLock are set
======= ===============================================================

QEMU LED state extensions Server Message
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This submessage allows the server to send the current led state for the
lock keys (CapsLock, NumLock and ScrollLock) to client.

=============== ==================== ========== =======================
No. of bytes    Type                 [Value]    Description
=============== ==================== ========== =======================
1               ``U8``               255        *message-type*
1               ``U8``               2          *submessage-type*
1               ``U8``                          *led-flags*
=============== ==================== ========== =======================

The *led-flags* fields take the same values as described for the 'QEMU
LEDs state extension Psuedo-encoding'_.

             reply	other threads:[~2013-04-08 13:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 13:07 Lei Li [this message]
2013-04-15 12:40 ` [Qemu-devel] Support for VNC LED state extension proposal Gerd Hoffmann
2013-04-15 14:41   ` Anthony Liguori
2013-04-15 15:38     ` Gerd Hoffmann
2013-04-15 16:23       ` Anthony Liguori
2013-04-16  6:45         ` Gerd Hoffmann
2013-04-22 19:32           ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365426454-6723-1-git-send-email-lilei@linux.vnet.ibm.com \
    --to=lilei@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=lagarcia@br.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).