linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"driverdev-devel@linuxdriverproject.org"
	<driverdev-devel@linuxdriverproject.org>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"apw@canonical.com" <apw@canonical.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>
Subject: Re: [PATCH] Input: hyperv-keyboard - implement Type Clipboard Text
Date: Mon, 18 Aug 2014 11:51:52 -0700	[thread overview]
Message-ID: <20140818185151.GB31121@core.coreip.homeip.net> (raw)
In-Reply-To: <EE124450C0AAF944A40DD71E61F878C9933040@SINEX14MBXC417.southpacific.corp.microsoft.com>

On Mon, Aug 18, 2014 at 03:54:51AM +0000, Dexuan Cui wrote:
> > -----Original Message-----
> > From: Dmitry Torokhov
> > Sent: Saturday, August 16, 2014 0:58 AM
> > To: Dexuan Cui
> > > For each char in the string, the host sends 2 events (key down/up with the
> > > char's UNICODE value) to the guest.
> > > The patch finds each char's scan codes of key down/up, and injects the
> > > scan codes to the serio keyboard module.
> > >
> > > Known issues:
> > > 1) Only printable ASCII chars are supported, and unsupported chars are
> > > ignored. It seems unlikely to support generic UNICODE chars because there
> > > is not a generic API to inject a UNICODE char to text mode console, KDE,
> > > gnome, etc.
> > >
> > > 2) When we use the feature, make sure the CapsLock state of the VM's
> > > (virtual) keyboard is OFF because this patch assumes it -- we'll try to
> > > fix this later, probably by tracking the state of virtual CapsLock, because
> > > it looks the keyboard module doesn't supply an API for us to query the
> > state
> > > of the keyboard.
> > >
> > No way. If you want to do this this way, do it in hypervisor code and keep
> > feeding AT scan codes to hyperv-keyboard, although I am pretty sure users
> Hi Dmitry,
> Yeah, I had the same wish, but later I found this seems unlikely because IMO
> the feature was firstly invented for Windows VM + generic UNICODE chars,
> and we know there is no "scan code" for generic UNICODE chars... :-(

Do you know what guest is running? You could potentially gate on that.

> 
> > of
> > French, Czech and other keyboard layouts with numbers in upper register
> > and
> > symbols in lower will have a few choice words for you.
> Sorry, I can't understand what these are.
> Can you please give more details or a link to further info?

On French and many other European layouts to produce a number one needs to use
Shift key, instead of simply using lower register, as on US or UK layouts. I.e.
if you send scancode for KEY_3 through your proposed implementation it will
produce '#' and KEY_SHIFT + KEY_3 will result in '3'.

There are also issues with QWERTY/AZERTY and other layouts...

Thanks.

-- 
Dmitry

  reply	other threads:[~2014-08-18 18:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15  9:41 [PATCH] Input: hyperv-keyboard - implement Type Clipboard Text Dexuan Cui
2014-08-15 16:57 ` Dmitry Torokhov
2014-08-18  3:54   ` Dexuan Cui
2014-08-18 18:51     ` Dmitry Torokhov [this message]
2014-08-19  8:55       ` Dexuan Cui

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=20140818185151.GB31121@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=apw@canonical.com \
    --cc=decui@microsoft.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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).