Configurable keyboard mapping for HVM
PATCH 1/1 Configurable keyboard mapping for HVM
Current keyboard mapping is hardcoded to en-US in image.py. Attached patch make this value a configurable option.
tools/python/xen/xend/image.py +2 -1
@@ -361,11 +361,12 @@ vncdisplay = sxp.child_value(config, 'vncdisplay', int(self.vm.getDomid())) vncunused = sxp.child_value(config, 'vncunused') + keyboard = sxp.child_value(config, 'keyboard') if vncunused: ret += ['-vncunused'] else: ret += ['-vnc', '%d' % vncdisplay] - ret += ['-k', 'en-us'] + ret += ['-k', keyboard] vnclisten = sxp.child_value(config, 'vnclisten') if not(vnclisten): vnclisten = xen.xend.XendRoot.instance().get_vnclisten_address()
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
What happens here if 'keyboard' is undefined in the s-expression?
-- Keir
Quoted 28 lines · Guillaume Rousse
Current keyboard mapping is hardcoded to en-US in
image.py. Attached patch make this value a configurable option.
diff -Naurxen-3.0.3_0-src/tools/python/xen/xend/image.pyxen-3.0.3_0-src.allow_keyboard_mapping/tools/python/xen/xend/image.py---xen-3.0.3_0-src/tools/python/xen/xend/image.py2006-10-15 14:22:03.000000000 +0200
+++xen-3.0.3_0-src.allow_keyboard_mapping/tools/python/xen/xend/image.py2006-12- 18 11:45:22.000000000 +0100tools/python/xen/xend/image.py +2
-1@@ -361,11 +361,12 @@ vncdisplay = sxp.child_value(config, 'vncdisplay', int(self.vm.getDomid())) vncunused = sxp.child_value(config, 'vncunused') + keyboard = sxp.child_value(config, 'keyboard') if vncunused: ret += ['-vncunused'] else: ret += ['-vnc', '%d' % vncdisplay] - ret += ['-k', 'en-us'] + ret += ['-k', keyboard] vnclisten = sxp.child_value(config, 'vnclisten') if not(vnclisten): vnclisten =xen.xend.XendRoot.instance().get_vnclisten_address()
_______________________________________________
Xen-devel mailing list [email protected]
http://lists.xensource.com/xen-devel
Quoted 1 line · Keir Fraser
What happens here if 'keyboard' is undefined in the s-expression?
Good point. This updated patch uses 'en-us' as default.
tools/python/xen/xend/image.py +2 -1
@@ -361,11 +361,12 @@ vncdisplay = sxp.child_value(config, 'vncdisplay', int(self.vm.getDomid())) vncunused = sxp.child_value(config, 'vncunused') + keyboard = sxp.child_value(config, 'keyboard', 'en-us') if vncunused: ret += ['-vncunused'] else: ret += ['-vnc', '%d' % vncdisplay] - ret += ['-k', 'en-us'] + ret += ['-k', keyboard] vnclisten = sxp.child_value(config, 'vnclisten') if not(vnclisten): vnclisten = xen.xend.XendRoot.instance().get_vnclisten_address()
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 10 lines · Guillaume Rousse
Current keyboard mapping is hardcoded to en-US in
image.py. Attached patch make this value a configurable option.diff -Naur
xen-3.0.3_0-src/tools/python/xen/xend/image.pyxen-3.0.3_0-src.allow_keyboard_mapping/tools/python/xen/xend/image.pytools/python/xen/xend/image.py +0
-0@@ -361,11 +361,12 @@ vncdisplay = sxp.child_value(config, 'vncdisplay', int(self.vm.getDomid())) vncunused = sxp.child_value(config, 'vncunused')
tools/python/xen/xend/image.py line 372
Quoted 10 lines
tools/python/xen/xend/image.py +2
-1+ keyboard = sxp.child_value(config, 'keyboard') if vncunused: ret += ['-vncunused'] else: ret += ['-vnc', '%d' % vncdisplay] - ret += ['-k', 'en-us'] + ret += ['-k', keyboard] vnclisten = sxp.child_value(config, 'vnclisten') if not(vnclisten): vnclisten = xen.xend.XendRoot.instance().get_vnclisten_address()
Before we can submit this patch, we need a Signed-off-by: line, to indicate your acceptance of the Developer's Certificate of Origin.
http://www.osdl.org/newsroom/press_releases/2004/2004_05_24_dco.html
Thanks,
Ewan.
Hi Rousse,
Quoted 2 lines
Current keyboard mapping is hardcoded to en-US in
image.py. Attached patch make this value a configurable option.
I made the patch that corrects the same problem.
It was already applied to xen-unstable.hg.
· xen-unstable.hg : cs 12467
[Add to select keyboard layout]
To select the keymap, configuration file is defined as follows.
keymap='ja'
The input keymap is input as an option of qemu-dm.
qemu-dm -k ja
But it is not applied to xen3.0.3.
If this patch is applied, it is possible to select keyboard.
Thanks
--
Takanori Kasai