Opened 15 years ago
Closed 12 years ago
#4907 closed enhancement (fixed)
VirtualBox does not recognize left-side function keys on Sun keyboard -> fixed in SVN
Reported by: | Owned by: | ||
---|---|---|---|
Component: | other | Version: | VirtualBox 3.0.6 |
Keywords: | remap keyboard | Cc: | |
Guest type: | Windows | Host type: | Solaris |
Description (last modified by )
On the left-side of my Sun keyboard (PC style), I have the following keys:
Stop (F11) Again (F12) Props (F13) Undo (F14) Front (F15) Copy (F16) Open (F17) Paste (F18) Find (F19) Cut (F20)
I would like to get these recognized by VirtualBox. Especially, Copy, Paste and Cut to be translated to C-c, C-v and C-x accordingly.
Change History (51)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
The only thing we can translate them too are PC scan codes. Do those keys work if you use the keyboard with a real Windows system? If so they can theoretically work in a guest. Checking how X11 sees them using the "xev" tool might help us a bit. If you also know what scan codes they produce or correspond to, even better.
comment:3 by , 15 years ago
xev gives the following...
Copy
KeyPress event, serial 26, synthetic NO, window 0x880001,
root 0x30, subw 0x0, time 2236558698, (70,31), root:(1602,95), state 0x0, keycode 131 (keysym 0xffcd, F16), same_screen YES, XLookupString gives 0 characters: ""
KeyRelease event, serial 26, synthetic NO, window 0x880001,
root 0x30, subw 0x0, time 2236558801, (70,31), root:(1602,95), state 0x0, keycode 131 (keysym 0xffcd, F16), same_screen YES, XLookupString gives 0 characters: ""
Paste
KeyPress event, serial 26, synthetic NO, window 0x880001,
root 0x30, subw 0x0, time 2236613119, (106,89), root:(1638,153), state 0x0, keycode 132 (keysym 0xffcf, F18), same_screen YES, XLookupString gives 0 characters: ""
KeyRelease event, serial 26, synthetic NO, window 0x880001,
root 0x30, subw 0x0, time 2236613222, (106,89), root:(1638,153), state 0x0, keycode 132 (keysym 0xffcf, F18), same_screen YES, XLookupString gives 0 characters: ""
Cut
KeyPress event, serial 26, synthetic NO, window 0x880001,
root 0x30, subw 0x0, time 2236648877, (102,113), root:(1634,177), state 0x0, keycode 130 (keysym 0xffd1, F20), same_screen YES, XLookupString gives 0 characters: ""
KeyRelease event, serial 26, synthetic NO, window 0x880001,
root 0x30, subw 0x0, time 2236649013, (102,113), root:(1634,177), state 0x0, keycode 130 (keysym 0xffd1, F20), same_screen YES, XLookupString gives 0 characters: ""
I couldn't get a real Windows PC to recognize these keys.
comment:4 by , 15 years ago
I have a Sun support contract if that helps. For more information, please email me. Thanks
comment:5 by , 15 years ago
Finding out the scan codes to assign to the keys would help more. But if a physical Windows installation does not recognise the keys, we are probably not going to achieve much. We can't assign a key combination to a keypress, as the guest sees scan codes when you press and release keys, not key symbols.
comment:7 by , 15 years ago
Version: | VirtualBox 3.0.2 → VirtualBox 3.0.6 |
---|
A bit of quick googling suggests that the Sun keyboard probably does not actually "have" PS/2 scan codes for the additional keys. If you can suggest keys on a PS/2 or Microsoft keyboard that the additional function keys can be mapped to, we could consider that.
comment:8 by , 15 years ago
priority: | major → minor |
---|---|
Type: | defect → enhancement |
comment:9 by , 15 years ago
Key Equivalent
Stop F11 Props Control-a Front F15 Open Control-o Find Control-f
Again F12 Undo Control-z Copy Control-Insert Paste Shift-Insert Cut Shift-Delete
comment:10 by , 15 years ago
I would like to point out again that since VirtualBox emulates a physical keyboard, we can only map keys on the host to the equivalent of physical keys in the guest - NOT key combinations. I might also point out that there is no F15 key on a PS/2 or Microsoft keyboard.
comment:11 by , 15 years ago
Hmmm... According to the following http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf not only are F13-F24 defined, but there are also Stop, Again, Undo, Cut, Copy, Paste and Find (on page 2). But, maybe I don't understand this document.
comment:12 by , 15 years ago
If this is true, then I'd like to see the following equivalents:
Stop (F11) Again (F12) Props (F13) Undo (F14) Front (F15) Copy (F16) Open (F17) Paste (F18) Find (F19) Cut (F20)
comment:13 by , 15 years ago
Stop, Again and friends do not have PS/2 scan codes assigned. I must admit that I took a look at that document briefly earlier today, but I just missed the F13 to F24, which do have PS/2 scan codes. I could map F13 to F24 on the host keyboard to those keys, although I don't know whether (Solaris) guests would actually recognise that mapping.
comment:14 by , 15 years ago
Well, I'm not worried about Solaris guests. I'm worried about Windows guests on the Solaris host which is where we have a Sun Keyboard after all (do I have the host/guest terminology backwards?). So, I would be happy if you mapped those keys to F11-F20 as I indicated: Stop (F11) Again (F12) Props (F13) Undo (F14) Front (F15) Copy (F16) Open (F17) Paste (F18) Find (F19) Cut (F20) Thanks.
comment:15 by , 15 years ago
(Nearly) all PC keyboards have F11 and F12. And since you wrote yourself that Windows doesn't recognise the other function keys on physical hardware, I don't think that it will do better on virtual hardware which resembles physical hardware as closely as we can make it. Perhaps it is possible to set up the Windows guest to do things with those keys though...
comment:16 by , 15 years ago
I don't much care about F11 and F12. I'm just trying to be consistent with the xmodmap definitions for those keys. But, I definitely want F13-F20. If those were recognized, then I would have a chance of defining those keys in MS Office, Emacs/XEmacs, etc. I have gotten very used to these keys, and when I am using Windows, I am constantly sub-consciously pressing them (these keys have been part of the Sun experience for my 20 years of SunOS/Solaris usage). So, please define these. Thanks
comment:17 by , 15 years ago
Maybe that wasn't clear. This is what I'm looking for: Stop (F11) Again (F12) Props (F13) Undo (F14) Front (F15) Copy (F16) Open (F17) Paste (F18) Find (F19) Cut (F20). If F11/F12 are a problem for some reason, then: Props (F13) Undo (F14) Front (F15) Copy (F16) Open (F17) Paste (F18) Find (F19) Cut (F20).
comment:18 by , 15 years ago
This test build of the next stable release (please read this first) contains the change. I haven't tested it as I don't have a Sun keyboard handy. Feel free to give it a try, but don't get your hopes up for Windows guests if Windows on physical hardware can't handle the extra keys. You might also do me a favour and test it with a Solaris guest (a live CD?) if you have time.
comment:19 by , 15 years ago
This is awesome!!! Can this please be a feature now? All the left-side keys are recognized by XEmacs. However, Word only sees F11-F16, but that is probably a Word bug. We have a MS support contract so I'll contact them about Word.
comment:20 by , 15 years ago
Summary: | VirtualBox does not recognize left-side function keys on Sun keyboard → VirtualBox does not recognize left-side function keys on Sun keyboard -> fixed in SVN |
---|
Glad that it helps you. This change should be present in any future releases of VirtualBox.
comment:21 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:22 by , 15 years ago
I'm wondering if the trick in 2302 would help here. By that I mean something like Paste/F18 could be interpreted (by the VirtualBox application ONLY, not other applications if possible) as Shift-Insert. I don't really understand what they are talking about in 2302, so that's why I am asking. Thanks.
follow-up: 24 comment:23 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Has there been a regression? We are using VirtualBox v4.1.4 on Linux and the Function keys F13-F20 no longer appear to be recognized. We have an Oracle support contract for Solaris and Linux.
comment:24 by , 13 years ago
Description: | modified (diff) |
---|
Replying to VRod:
Has there been a regression? We are using VirtualBox v4.1.4 on Linux and the Function keys F13-F20 no longer appear to be recognized.
Could you please be a bit more specific about how you determined that? It might well be true, as I don't think any of us have checked for a long time, but it would be good to know.
We have an Oracle support contract for Solaris and Linux.
I don't think that covers VirtualBox, but we may be able to resolve this without.
comment:25 by , 13 years ago
We have moved to a new Oracle Linux server. But, I used the same prescription to test those keys that I used before; i.e. I used the stable version of XEmacs for Windows (and I also tested it with GNU Emacs). Only F11 and F12 are recognized (of course, all of the keys are recognized by the Linux host, but the VirtualBox Windows guest never sees them). I have an old Sun USB Type 7 keyboard. The letter keys are sticky, but the function keys are fine; you can have it. Do you want me to FedEx it to you for testing? What is your address? You can send it to me privately if you don't want that information in the database. Thanks
comment:26 by , 13 years ago
I don't think that will be needed. Could you please check in a Linux guest (a DSL live CD is a quick solution if you don't have a Linux guest handy) whether the keys are recognised there? The "xev" tool inside an X session and the "showkeys -s" tool from a virtual terminal (not an X terminal) provide useful information. The information produced by xev on the host could be useful too.
comment:27 by , 13 years ago
With Ubuntu 11.10 LTS, showkey -s just gives me: Couldn't get a file descriptor referring to the console With showkey -a, I see that F11 and F12 do work, but none of the other keys show anything in the terminal.
comment:28 by , 13 years ago
Did you use "sudo" with "showkey -s"? And were you able to get the other information?
comment:31 by , 13 years ago
$ xev Outer window is 0x4e00001, inner window is 0x4e00002
PropertyNotify event, serial 8, synthetic NO, window 0x4e00001,
atom 0x27 (WM_NAME), time 3474689107, state PropertyNewValue
PropertyNotify event, serial 9, synthetic NO, window 0x4e00001,
atom 0x22 (WM_COMMAND), time 3474689107, state PropertyNewValue
PropertyNotify event, serial 10, synthetic NO, window 0x4e00001,
atom 0x28 (WM_NORMAL_HINTS), time 3474689107, state PropertyNewValue
CreateNotify event, serial 11, synthetic NO, window 0x4e00001,
parent 0x4e00001, window 0x4e00002, (10,10), width 50, height 50
border_width 4, override NO
MapNotify event, serial 12, synthetic NO, window 0x4e00001,
event 0x4e00001, window 0x4e00002, override NO
ConfigureNotify event, serial 17, synthetic NO, window 0x4e00001,
event 0x4e00001, window 0x4e00001, (0,0), width 178, height 178, border_width 0, above 0x1000846, override NO
ReparentNotify event, serial 17, synthetic NO, window 0x4e00001,
event 0x4e00001, window 0x4e00001, parent 0xc0f246, (0,0), override NO
PropertyNotify event, serial 17, synthetic NO, window 0x4e00001,
atom 0xf8 (_NET_WM_DESKTOP), time 3474689108, state PropertyNewValue
PropertyNotify event, serial 17, synthetic NO, window 0x4e00001,
atom 0xf8 (_NET_WM_DESKTOP), time 3474689108, state PropertyNewValue
PropertyNotify event, serial 17, synthetic NO, window 0x4e00001,
atom 0x15f (_NET_FRAME_EXTENTS), time 3474689109, state PropertyNewValue
ConfigureNotify event, serial 17, synthetic NO, window 0x4e00001,
event 0x4e00001, window 0x4e00001, (5,29), width 178, height 178, border_width 0, above 0x0, override NO
PropertyNotify event, serial 17, synthetic NO, window 0x4e00001,
atom 0x6a (WM_STATE), time 3474689109, state PropertyNewValue
PropertyNotify event, serial 17, synthetic NO, window 0x4e00001,
atom 0xfe (_NET_WM_STATE), time 3474689109, state PropertyNewValue
ConfigureNotify event, serial 17, synthetic YES, window 0x4e00001,
event 0x4e00001, window 0x4e00001, (1928,56), width 178, height 178, border_width 2, above 0x0, override NO
MapNotify event, serial 17, synthetic NO, window 0x4e00001,
event 0x4e00001, window 0x4e00001, override NO
VisibilityNotify event, serial 17, synthetic NO, window 0x4e00001,
state VisibilityUnobscured
Expose event, serial 17, synthetic NO, window 0x4e00001,
(0,0), width 178, height 10, count 3
Expose event, serial 17, synthetic NO, window 0x4e00001,
(0,10), width 10, height 58, count 2
Expose event, serial 17, synthetic NO, window 0x4e00001,
(68,10), width 110, height 58, count 1
Expose event, serial 17, synthetic NO, window 0x4e00001,
(0,68), width 178, height 110, count 0
PropertyNotify event, serial 17, synthetic NO, window 0x4e00001,
atom 0xfe (_NET_WM_STATE), time 3474689110, state PropertyNewValue
FocusIn event, serial 17, synthetic NO, window 0x4e00001,
mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 17, synthetic NO, window 0x0,
keys: 4294967244 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PropertyNotify event, serial 17, synthetic NO, window 0x4e00001,
atom 0xfe (_NET_WM_STATE), time 3474689110, state PropertyNewValue
PropertyNotify event, serial 21, synthetic NO, window 0x4e00001,
atom 0x124 (XKLAVIER_STATE), time 3474689113, state PropertyNewValue
KeyRelease event, serial 25, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474689188, (908,147), root:(2838,205), state 0x20, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
PropertyNotify event, serial 28, synthetic NO, window 0x4e00001,
atom 0x13c (_NET_WM_ICON_GEOMETRY), time 3474689621, state PropertyNewValue
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474695787, (966,163), root:(2896,221), state 0x20, keycode 147 (keysym 0xffca, F13), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474695923, (966,163), root:(2896,221), state 0x20, keycode 147 (keysym 0xffca, F13), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474697243, (966,163), root:(2896,221), state 0x20, keycode 148 (keysym 0xffcb, F14), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474697407, (966,163), root:(2896,221), state 0x20, keycode 148 (keysym 0xffcb, F14), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474698075, (966,163), root:(2896,221), state 0x20, keycode 149 (keysym 0xffcc, F15), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474698175, (966,163), root:(2896,221), state 0x20, keycode 149 (keysym 0xffcc, F15), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474698547, (966,163), root:(2896,221), state 0x20, keycode 150 (keysym 0xffcd, F16), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474698668, (966,163), root:(2896,221), state 0x20, keycode 150 (keysym 0xffcd, F16), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474699099, (966,163), root:(2896,221), state 0x20, keycode 151 (keysym 0xffce, F17), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474699212, (966,163), root:(2896,221), state 0x20, keycode 151 (keysym 0xffce, F17), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474699563, (966,163), root:(2896,221), state 0x20, keycode 152 (keysym 0xffcf, F18), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474699683, (966,163), root:(2896,221), state 0x20, keycode 152 (keysym 0xffcf, F18), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474700083, (966,163), root:(2896,221), state 0x20, keycode 153 (keysym 0xffd0, F19), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474700212, (966,163), root:(2896,221), state 0x20, keycode 153 (keysym 0xffd0, F19), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474700603, (966,163), root:(2896,221), state 0x20, keycode 154 (keysym 0xffd1, F20), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 29, synthetic NO, window 0x4e00001,
root 0x63, subw 0x0, time 3474700700, (966,163), root:(2896,221), state 0x20, keycode 154 (keysym 0xffd1, F20), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
VisibilityNotify event, serial 29, synthetic NO, window 0x4e00001,
state VisibilityPartiallyObscured
VisibilityNotify event, serial 29, synthetic NO, window 0x4e00001,
state VisibilityUnobscured
comment:32 by , 13 years ago
Just to be sure there - are STOP and AGAIN giving you F11 and F12, and the other left-hand-side keys F13 to F20? If so what do the "real" F11 and F12 give you? I still haven't quite got the hang of Sun keyboards.
comment:33 by , 13 years ago
As far as I can tell, STOP and F11 are duplicates; same with AGAIN and F12. F13-F20 have no duplicates.
comment:34 by , 13 years ago
VRod: what version of Linux are you using on the host system, and in particular 32 or 64 bits?
comment:37 by , 13 years ago
Here is a link to a 64bit test version of VirtualBox for RHEL 5 which I hope will fix your issue (The usual warnings about using test software apply, though this is from the stable branch, so I don't expect any problems). You may have to change the VM to use an emulated USB keyboard though rather than the default PS/2 one.
https://www.virtualbox.org/download/testcase/VirtualBox-4.1-4.1.9_76596_rhel5-1.x86_64.rpm
comment:38 by , 13 years ago
It's not working yet. How do I tell it to use an emulated USB keyboard? I can't seem to find that in the manual.
comment:39 by , 13 years ago
$ VBoxManage modifyvm <VM name> --keyboard USB
Do those keys now produce any scan codes inside the guest? I will take a look tomorrow, as I will be near a Sun keyboard.
comment:40 by , 13 years ago
That doesn't work... $ VBoxManage modifyvm Dilbert --keyboard USB VBoxManage: error: Invalid type 'USB' specfied for keyboard
comment:42 by , 13 years ago
Now, I can't do a Crtl-Alt-Del to log on. It doesn't work from the Machine menu either.
comment:44 by , 13 years ago
See this - https://forums.oracle.com/forums/thread.jspa?threadID=1906018 - I think you are out of luck. If it doesn't work with a physical keyboard we can't emulate it into working.
comment:45 by , 13 years ago
But, we had this working before. Wouldn't you support a keyboard made by the same company? Like I said, we have a support contract with Oracle for Linux and Solaris.
comment:46 by , 13 years ago
In what way was it working before? As in what host, what guest, what version of VBox?
comment:47 by , 13 years ago
Just for the record since I am researching this. Based on the Linux file "drivers/hid/usbhid/usbkbd.c", the Sun keys map to the following USB usage codes:
Stop: 0x78 (Keyboard Stop) Again: 0x79 (Keyboard Again) Props: 0x76 (Keyboard Menu) Undo: 0x7a (Keyboard Undo) Front: 0x77 (Keyboard Select) Copy: 0x7c (Keyboard Copy) Open: 0x74 (Keyboard Execute) Paste: 0x7d (Keyboard Paste) Find: 0x7e (Keyboard Find) Cut: 0x7b (Keyboard Cut) Help: 0x75 (Keyboard Help)
comment:48 by , 13 years ago
It was working with Solaris 10 as the host and Windows XP as the guest. This bug report was originally posted, and the bug was fixed on that platform, a couple of years ago. We recently move to Oracle Linux. But, I was surprised it did not work with Oracle Linux as the host since the Sun keyboard functions exactly the same way. It is recognized as a Type 6 USB keyboard (which, as I understand it, is exactly the same as a Type 7 for all locales except Japanese).
comment:49 by , 13 years ago
Just to be clear again: having a support contract for Oracle Linux and Solaris does not give you any rights to demand engineering work on VirtualBox, which is an unrelated product. Further more, this has never to my knowledge worked on an Oracle Linux host, and we don't feel any moral obligation to support extra buttons on keyboards which happen to be produced by the same company. That said (this is all on a purely voluntary basis), you might give this build a try:
http://www.virtualbox.org/download/testcase/VirtualBox-4.1-4.1.9_76704_rhel5-1.x86_64.rpm
The keys work in a Linux guest emulating a USB keyboard. They should report PS/2 scan codes F13 to F23 (with Stop, Again and Help reported as F21 to F23) with PS/2 emulation, but Linux guests seem to ignore this. I don't know if Windows guests will or not.
comment:50 by , 13 years ago
Yes!!!!! That works in a Windows guest! The usb setting is the same, i.e. you can't do anything. But, the ps2 setting works and F13-F20 are now recognized! I assume this will now be a standard feature of vbox going forward. Thank you!
comment:51 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Oh, I just realized that there may be issues with Emacs. So, the translation that I propose is Copy, Paste and Cut to be translated to Control-Insert, Shift-Insert and Shift-Delete accordingly. That should work for Emacs and all CUA applications.