VirtualBox

Ticket #4907 (closed enhancement: fixed)

Opened 3 months ago

Last modified 2 months ago

VirtualBox does not recognize left-side function keys on Sun keyboard -> fixed in SVN

Reported by: rsparapa@mcw.edu Assigned to:
Priority: minor Component: other
Version: VirtualBox 3.0.6 Keywords: remap keyboard
Cc: Guest type: Windows
Host type: Solaris

Description

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

2009-09-03 22:51:11 changed by rsparapa@mcw.edu

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.

2009-09-03 23:19:17 changed by michael

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.

2009-09-04 16:17:26 changed by rsparapa@mcw.edu

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.

2009-09-11 15:42:47 changed by rsparapa@mcw.edu

I have a Sun support contract if that helps. For more information, please email me. Thanks

2009-09-11 16:02:01 changed by michael

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.

2009-09-11 16:20:11 changed by rsparapa@mcw.edu

Ok, but how?

2009-09-11 16:35:37 changed by michael

  • version changed from VirtualBox 3.0.2 to 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.

2009-09-11 16:35:53 changed by michael

  • priority changed from major to minor.
  • type changed from defect to enhancement.

2009-09-11 18:11:56 changed by rsparapa@mcw.edu

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

2009-09-11 18:29:22 changed by michael

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.

2009-09-11 21:13:38 changed by rsparapa@mcw.edu

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.

2009-09-11 21:27:51 changed by rsparapa@mcw.edu

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)

2009-09-11 23:39:05 changed by michael

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.

2009-09-11 23:45:14 changed by rsparapa@mcw.edu

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.

2009-09-12 00:03:04 changed by michael

(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...

2009-09-12 21:08:14 changed by rsparapa@mcw.edu

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

2009-09-13 14:24:44 changed by rsparapa@mcw.edu

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).

2009-09-15 22:49:19 changed by michael

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.

2009-09-16 20:34:53 changed by rsparapa@mcw.edu

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.

2009-09-17 19:24:22 changed by michael

  • summary changed from VirtualBox does not recognize left-side function keys on Sun keyboard to 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.

2009-10-06 11:42:11 changed by frank

  • status changed from new to closed.
  • resolution set to fixed.

© 2009 Sun Microsystems, Inc.
ContactPrivacy policy