Ticket #692 (closed usability: behaves correctly)

Opened 17 months ago

Last modified 14 months ago

Mountain Lion - XQuartz problems with keyboard

Reported by: tim.kahlke@… Owned by: jeremyhu@…
Priority: Not Set Milestone:
Component: xserver Version: 2.7.4 (xserver-1.13.0)
Keywords: keyboard setting Cc: antoine@…

Description

Hei,

have problems with the keyboard when using ssh -x. I connect from my Macbook Pro (OSX 10.8.2) via ssh -X to a server and everything works fine. Starting virtualbox and still the keyboard works fine. But when I start a virtual machine the console of the VM does not recognize the keyboard and only arrows, space-bar and enter work. A similar bug has been mentioned in ticket-659 and ticket-471 for XQuartz 2.6.

Tried another MBP with OSX 10.5 and XQuartz 2.1.6 (xorg-server 1.4.2-apple33) and it works without problems.

Change History

comment:1 Changed 14 months ago by antoine@…

I have the same issue and first have reported it to the VirtualBox developers. I'm still not sure if its a Virtual Box or XQuartz bug though...

comment:2 Changed 14 months ago by antoine@…

  • Cc antoine@… added

Cc Me!

comment:3 Changed 14 months ago by antoine@…

Well, after a bit of testing and nice support from the VirtualBox developer, this issue has been fixed on their side. Hopefully the patches will come out soon in a new VirtualBox version.

Still, there remains something weird in the way XQuartz is setting up its keyboard resources. The calls to setxkbmap return things other X11 software cannot use. In VirtualBox they had to discard the X11 information they got from XQuartz to make it work. I don't know if it's a local configuration issue or if this is a XQuartz bug.

comment:4 follow-up: ↓ 5 Changed 14 months ago by jeremyhu@…

What do you mean the calls to setxkbmap return things other X11 software cannot use? setxkbmap is used to *change* the keyboard mapping. Why are they trying to change it?

comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 14 months ago by antoine@…

Replying to jeremyhu@…:

What do you mean the calls to setxkbmap return things other X11 software cannot use? setxkbmap is used to *change* the keyboard mapping. Why are they trying to change it?

Sorry, I wasn't clear enough and I'm still a bit confused at what the problem is, but I actually meant XKB. It seems the XKB information coming from XQuartz cannot be used by VirtualBox. On my machine, the XKB information seems to be empty. At least a call to setxkbmap -print shows empty settings. VirtualBox was then unable to make anything from it to build its keyboard mapping and had to rely on other ways. This comment from the VirtualBox bug thread might be worth reading.

At first I was trying to use setxkbmap to set the XKB keyboard correctly, but nothing come out right. Is the following output in an XQuartz Xterm correct/expected? (I have an AZERTY keyboard)

antoine@amarante:~$ setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "empty+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "empty(basic)"  };
        xkb_geometry  { include "pc(pc104)"     };
};

comment:6 in reply to: ↑ 5 Changed 14 months ago by jeremyhu@…

  • Status changed from new to closed
  • Resolution set to behaves correctly

Replying to antoine@…:

Replying to jeremyhu@…:

What do you mean the calls to setxkbmap return things other X11 software cannot use? setxkbmap is used to *change* the keyboard mapping. Why are they trying to change it?

Sorry, I wasn't clear enough and I'm still a bit confused at what the problem is, but I actually meant XKB. It seems the XKB information coming from XQuartz cannot be used by VirtualBox. On my machine, the XKB information seems to be empty. At least a call to setxkbmap -print shows empty settings.

That's perfectly valid. We don't use a compiled keymap because our keymap is generated at runtime. Thus you can't refer it to a static layout.

VirtualBox was then unable to make anything from it to build its keyboard mapping and had to rely on other ways. This comment from the VirtualBox bug thread might be worth reading.

At first I was trying to use setxkbmap to set the XKB keyboard correctly, but nothing come out right.

You used setxkbmap to change your keymap to *something* and that something was not matching the correct layout, so I wouldn't say you set it correctly ;)

Is the following output in an XQuartz Xterm correct/expected? (I have an AZERTY keyboard)

antoine@amarante:~$ setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "empty+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "empty(basic)"  };
        xkb_geometry  { include "pc(pc104)"     };
};

Yes. It provides the base (empty) set to which we append our runtime configuration. VirtualBox needs to actually get the *real* layout rather than just trying to use the compiled layout by matching names. I provided a response in that ticket pointing them to code that I wrote to do that in another project, so hopefully that will help them out.

Closing this issue.

Thanks.

Note: See TracTickets for help on using tickets.