summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-02-03 15:26:44 +0100
committerAlon Levy <alevy@redhat.com>2012-02-16 12:34:28 +0200
commit994ac381a57e7a9ec502371c6aa3f491c1f1165f (patch)
tree457299fabe370fb81600c0ad5fefd52f4b14edcb
parent8b3c5a5fac297226a467ea15c16cea8e5da51b8f (diff)
xspice_keyboard_proc: fix arrow keys
Not sure yet why the regression with the arrow keys not producing the right keysym, but it appears that the keycode is correct for up (as an example), 111, but the keysym being produced was 0xff6c and not the correct 0xff52. This boiled down to the rules of the default rmlvo being "base" instead of "evdev". Providing an rmlvo parameter to InitKeyboardDeviceStruct allows to override that. The chosen rules = "evdev" model = "pc105" layout = "us" Is the default used by Xephyr from xorg-x11-server-Xephyr-1.11.99.901-3.20120124.fc17.x86_64
-rw-r--r--src/spiceqxl_inputs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/spiceqxl_inputs.c b/src/spiceqxl_inputs.c
index ae08a57..877585b 100644
--- a/src/spiceqxl_inputs.c
+++ b/src/spiceqxl_inputs.c
@@ -149,11 +149,18 @@ static void xspice_keyboard_control(DeviceIntPtr device, KeybdCtrl *ctrl)
static int xspice_keyboard_proc(DeviceIntPtr pDevice, int onoff)
{
DevicePtr pDev = (DevicePtr)pDevice;
+ XkbRMLVOSet rmlvo = {
+ .rules = "evdev",
+ .model = "pc105",
+ .layout = "us",
+ .variant = "",
+ .options = "",
+ };
switch (onoff) {
case DEVICE_INIT:
InitKeyboardDeviceStruct(
- pDevice, NULL, xspice_keyboard_bell, xspice_keyboard_control
+ pDevice, &rmlvo, xspice_keyboard_bell, xspice_keyboard_control
);
break;
case DEVICE_ON: