Re: Testing of russian keymap (was Re: [Qemu-devel] [PATCH] fix '/' and '|' on russian keymap)

2010-10-19 Thread Oleg Sadov
19/10/2010 10:32 +0100, Daniel P. Berrange wrote:
 On Mon, Oct 18, 2010 at 01:59:15PM -0500, Anthony Liguori wrote:
  On 10/18/2010 12:30 PM, Oleg Sadov wrote:
  I don't understand reasons for such locale-default keyboard settings for
  qemu too, but may be it's useful for someone...
 
  
  -k only exists to deal with crappy VNC clients.
  
  If you use a good VNC client (like vinagre or virt-viewer) then you 
  don't have to use -k.
 
 Indeed you must *NOT* use -k then, because that disables the extension
 that vinagre/virt-viewer rely on for sane keyboard handling.

I don't use '-k' option directly -- in my RHEL-based system it's
automagically appended to qemu-kvm by libvirt. KVM XML-description,
created by standard virt-manager GUI-interface (package
virt-manager-0.6.1-12.el5.x86_64), has a 'keymap' attribute of
'graphics' tag, despite that configurator don't have any controls for
'keymap' setting.

As I understand, 'default_keymap' function from util.py (package
python-virtinst-0.400.3-9.el5.noarch) got information
from /etc/sysconfig/keyboard, then keymap searched in 'keytable'
dictionary from keytable.py and automatically placed to 'keymap'
attribute of 'graphics' tag in virtual-machine XML-description.

In our system we have a russian keyboard settings = we've got a XML
description like this:

 graphics type='vnc' port='-1' autoport='yes' keymap='ru'/

and, as a consequence, qemu-kvm running with '-k ru' option.

 Regards,
 Daniel

Sincerely,
--Oleg




Re: Testing of russian keymap (was Re: [Qemu-devel] [PATCH] fix '/' and '|' on russian keymap)

2010-10-18 Thread Oleg Sadov
Sorry for delay with answer -- vacations time without e-mail account
access.

07/10/2010 08:38 +0400, Michael Tokarev wrote:
 06.10.2010 23:56, Eduardo Habkost wrote:
  
  Anybody using a russian keyboard layout who can test this change and
  confirm it works as expected?
 
 I can perform such a testing - in theory.  But in practice, I was never
 able to figure out this -k $lang stuff, -- neither in qemu nor in other
 apps like rdesktop and the like.
 
 What I usually do is to explicitly set en-us keyboard for applications
 that are too smart and tries to guess right keyboard from env.
 variables such as $LANG.

 The reason is that after specifying ru keyboard, I can't use latin
 chars anymore, and can type only using cyrillic.  Since cyrillic
 layout does not have any latin char, imagine how to type, say, a
 path name (even C: drive in windows).

 All modern OSes nowadays have a way to switch between keyboard layouts
 dynamically - this is done internally in the operating system.  So,
 basically, I've no idea what this -k $foo stuff is used for to start
 with ;)

 Care to explain please?  Oleg?  :)

I don't understand reasons for such locale-default keyboard settings for
qemu too, but may be it's useful for someone...

 Thanks!
 
 /mjt

Regards!
--Oleg