Opened 15 years ago
Closed 6 years ago
#5764 closed defect (fixed)
Arrow and other keys not working when starting with VBoxSDL => Fixed in SVN
Reported by: | harmscon | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 3.1.0 |
Keywords: | VBoxSDL arrow keys | Cc: | |
Guest type: | other | Host type: | other |
Description (last modified by )
Host: Ubuntu 9.10 32bit i386
Guest: Windows XP SP3 32bit i386
VirtualBox: 3.1
After upgrading the Host OS (from Ubuntu 8.04) the arrow keys, Home, End, Insert, PgUp, PgDwn, and / on the numeric keypad no longer work when starting the virtual machine with VBoxSDL.
The upgrade was an export VBox virtual machine, format hard drive, clean install new OS and then import the vbox Virtual machine.
I use the following command to start VirtualBox:
/usr/bin/gksudo -u fred 'VBoxSDL --startvm freds_VM --nofstoggle --termacpi'
After the upgrade mentioned above, the keyboard keys stopped working (sometimes the Start menu will open, other times it's like a right mouse click is pressed.)
If I start Virtual box like this:
/usr/bin/gksudo -u fred VBoxManage startvm freds_VM
all keys work as expected and as they always have, no matter which of these two methods I use to start the VM.
So this appears to be specific to VBoxSDL.
Attachments (2)
Change History (18)
by , 15 years ago
comment:1 by , 15 years ago
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
comment:2 by , 15 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Hello,
I have the same problem on a windows vista host. I tried option '--evdevkeymap' but this option doesn't exist (Version 3.1.6 r59338).
Any idea?
Thanks in advance.
comment:3 by , 15 years ago
That option does exist in VBox 3.1.6. What happens if you start your VM with
VBoxSDL --evdevkeymap --startvm VM_NAME
(replace VM_NAME with the name of a VM)?
comment:4 by , 15 years ago
It displays the usage message :
PS C:\Program Files\Sun\VirtualBox> & 'C:\Program Files\Sun\VirtualBox\VBoxSDL.exe' --evdevkeymap --startvm Debian Sun VirtualBox SDL GUI version 3.1.6 (C) 2005-2010 Sun Microsystems, Inc. All rights reserved. Error: unrecognized switch '--evdevkeymap' Usage: --startvm <uuid|name> Virtual machine to start, either UUID or name --hda <file> Set temporary first hard disk to file --fda <file> Set temporary first floppy disk to file .....
comment:6 by , 15 years ago
Hmm, looks like this is a Windows host. The --evdevkeymap switch is only available for Linux hosts. Yours must be another issue then.
comment:7 by , 15 years ago
Yes it is a windows host (as mentionned in my first message). Do I have to create to create a new ticket?
comment:8 by , 15 years ago
Hi,
I have a the same problem with VirtualBox 3.2.0 (ubuntu 10.4 host + ubuntu 9.10 guest). '--evdevkeymap' helps but the new command "VBoxManage --startvm uuid --type sdl" does not allows to pass this option.
I would use the VBoxSDL command, but since this release, VBoxSDL does not set the title attribute of the X windows anymore (tested with xlsclients command line util), which is a MUST in my integration setup. Actually I am stuck.
Regards, Frederic
comment:9 by , 15 years ago
Summary: | Arrow and other keys not working when starting with VBoxSDL → Arrow and other keys not working when starting with VBoxSDL => Fixed in SVN |
---|
This will be fixed in the next maintenance release. VBoxSDL will inherit the keyboard handling from the Qt GUI.
comment:10 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:11 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Did the fix go into the OSE? I'm still having the same exact problem with VirtualBox 3.2.12 OSE and 3.2.8 OSE (both self compiled)
Windows 7 32bit Guest: All operating systems have the problem
There are other strange issues with keyboard mapping, one user complained about the "\" key mapping to the "]" key... still investigating.
I tried to launch the same VM using VirtualBox.exe and the problem was NOT there, so there must be something wrong with vboxsdl.exe.
I also noticed that the first "UP Arrow" key works and prints "[[A" but the second and on print "8"
comment:12 by , 14 years ago
Sorry, the first up arrow key press prints the following:
^[[A
Then it starts printing the following:
8
VirtualBox is running on Windows 7 32bit
Guest machine is a debian linux 2.6 with Xorg 7.4
comment:13 by , 14 years ago
Below patch against 3.2.12 seems to work for Windows hosts.
--- VBoxSDL-org.cpp 2010-12-01 18:09:24 +0100 +++ VBoxSDL.cpp 2010-12-29 23:50:35 +0100 @@ -2919,7 +2919,7 @@
return (gfAbsoluteMouseHost && gfAbsoluteMouseGuest);
}
defined(RT_OS_OS2) | |
defined(RT_OS_OS2) | defined(RT_OS_WINDOWS) |
/
- Fallback keycode conversion using SDL symbols. *
@@ -3392,7 +3392,7 @@
RTPrintf("scancode=%#x -> %#x\n", ev->keysym.scancode, keycode);
#endif
-#elif RT_OS_OS2
defined(RT_OS_WINDOWS) |
keycode = Keyevent2KeycodeFallback(ev);
#endif /* RT_OS_DARWIN */
return keycode;
by , 14 years ago
Attachment: | VBoxSDL.cpp.cursorkeys.diff added |
---|
Vbox SDL frontend cursor keys patch
comment:14 by , 14 years ago
Verified that the fix works for the arrow keys. I tested on Windows 7 64bit with Linux 2.4 guest.
I know this is not the place to ask questions, but do you think this would fix the cases were the "\" key maps to the "]" key?
Thanks, RK
comment:15 by , 14 years ago
@rbhkamal:
Backslash '\' works OK on my keyboard in Win7 host and Fedora 14 guest. Maybe this is caused by a keyboard mapping in the guest?!
About the patch: it converts the SDL internal key codes back to "raw" key input for the guest. The source file has it prepared, but did not have it connected for Windows hosts.
comment:16 by , 6 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
I'm quite sure your problems are gone when you append the --evdevkeymap switch to your VBoxSDL parameters.