VirtualBox

Opened 17 years ago

Closed 17 years ago

Last modified 14 years ago

#436 closed defect (fixed)

Keyboard completelly messed up

Reported by: linuxrulez Owned by:
Component: other Version: VirtualBox 1.4.0
Keywords: scancode keycode sunray Cc:
Guest type: other Host type: other

Description

Keyboard layout is completely messed up (All key mapping is wrong) It seems the problem is the use of scancodes (had the same problem with dosbox. not using scancodes helps)

Specifically this problem occurs only when connected via SunRay terminal (XKB on or off makes no difference) No problem when connected via XDMCP or physically. XEV reports GOOD key symbols and codes (including XKB=on)

HOST: openSuSE 10.2 x86_64 terminal:~ # setxkbmap -print | xkbcomp - $DISPLAY terminal:~ # setxkbmap -print xkb_keymap {

xkb_keycodes { include "sun(type6_usb)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "sun/us(type6)" }; xkb_geometry { include "sun(type6)" };

}; Keyboard used: Sun Type7. Keycode / symbol maps edited to make it work under X with XKB=ON

P.S. In preferences HOST key selection works, problem occurs in VM window

Attachments (1)

keycodes (4.3 KB ) - added by linuxrulez 17 years ago.
keycode mapping

Download all attachments as: .zip

Change History (10)

comment:1 by Michael Thayer, 17 years ago

Do Wine applications work with your setup? This is basically a scan code problem - most X11 applications work with key symbols, not with scan codes, but for obvious reasons we can't do that in a virtual machine.

comment:2 by linuxrulez, 17 years ago

Yes. Tested:

WINE's own WCMD and WineConsole Internet Explorer 6SP1 (from Ies4Linux)

wine-0.9.39

As far as I know, VirtualBox, like DosBox, uses SDL for keyboard capturing. DosBox has ability to turn off scancode using. Is there ANY way to turn it off on VirtualBox ?

comment:3 by Michael Thayer, 17 years ago

And is the keyboard layout similar to a PC keyboard? We work out the scan code mapping based on the keyboard layout (and the main VirtualBox front end does not use SDL for this). Unfortunately we can only use scan codes, as the installed guest operating systems are written to deal with physical (PC) keyboard controllers which do not know anything about the actual layout.

comment:4 by linuxrulez, 17 years ago

I have to setup Sun Type 7 (USB) keyboard, witch is in fact the same as type6 (SUN provides broken symbols file, fixed it to make XKB work)

I used US layout (haven't tried national layout yet)

Wouldn't it be easier to just remap scancodes? (fetch symbol with current X symbol map, translate symbol to scancode using some other keycode map. Maybe pc105?) This way, physical keyboard's scancode would make no difference. I've attached xmodmap -pke output

by linuxrulez, 17 years ago

Attachment: keycodes added

keycode mapping

comment:5 by Michael Thayer, 17 years ago

We do something on those lines. We read the symbols attached to each key on the keyboard, and based on that, we try to match the keyboard to a known layout, and from that, to map the scan codes of the keyboard to PC keyboard scan codes for translation purposes. Note that we only do this for remote terminals. If VirtualBox is running on the machine used as an X display, we just assume that it is a PC, and use known scan code translations. We currently look at the $DISPLAY variable to decide whether the display is remote or local. If it starts with ':' (like :0.0'), we assume that it is local. Could that be the problem here?

You might want to have a look at our keyboard handling code, which is in the directory

http://www.virtualbox.org/browser/trunk/src/VBox/Frontends/VirtualBox/src/linux

comment:6 by linuxrulez, 17 years ago

Yes, this is the case. When logging in from SynRay, X is local (DISPLAY=:11.0) export DISPLAY="localhost$DISPLAY" solves the problem

comment:7 by Sander van Leeuwen, 17 years ago

priority: blockermajor

comment:8 by Roel Mathys, 17 years ago

using a Belgian layout, I'm missing some keys (e.g. the '6' - luckily I can use the numerical keyboard for that) and some keys are mapped wrong.

rm

comment:9 by Michael Thayer, 17 years ago

Resolution: fixed
Status: newclosed

The last issue is fixed in VirtualBox 1.5.2, due to be released in a few days. See ticket #599 for that, the other issue is fixed in 1.5.0.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use