VirtualBox

Ticket #4907 (reopened enhancement) — at Version 24

Opened 10 years ago

Last modified 7 years ago

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

Reported by: rsparapa@… Owned by:
Component: other Version: VirtualBox 3.0.6
Keywords: remap keyboard Cc:
Guest type: Windows Host type: Solaris

Description (last modified by michael) (diff)

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

comment:1 Changed 10 years ago by rsparapa@…

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.

comment:2 Changed 10 years ago 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.

comment:3 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago by rsparapa@…

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

comment:5 Changed 10 years ago 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.

comment:6 Changed 10 years ago by rsparapa@…

Ok, but how?

comment:7 Changed 10 years ago 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.

comment:8 Changed 10 years ago by michael

  • priority changed from major to minor
  • Type changed from defect to enhancement

comment:9 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago 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.

comment:11 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago 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.

comment:14 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago 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...

comment:16 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago 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.

comment:19 Changed 10 years ago by rsparapa@…

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 Changed 10 years ago 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.

comment:21 Changed 10 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

comment:22 Changed 10 years ago by rsparapa@…

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.

comment:23 follow-up: ↓ 24 Changed 8 years ago by VRod

  • Status changed from closed to reopened
  • Resolution fixed deleted

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 in reply to: ↑ 23 Changed 8 years ago by michael

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

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use