Keyboard Mapping To and From a Mac

Follow

This article summarizes the keys and key combinations you need to press in order to achieve the result you expect if you are connecting to or from a Mac.

If you are connecting to a Mac from a Windows or Linux PC or vice versa, the two computers will likely have different keyboards. Some keys will be unique, and some keys with the same name perform will perform different functions. For example, the key marked “Alt” on modern Macs (also known as the “Option” key) performs a different function to the “Alt” key on PC keyboards. (It is most similar to the “AltGr” key on non-US PC keyboards.) Consequently, the Mac’s “Option/Alt” key is not mapped to the “Alt” keysyms over the RFB protocol. This marks a compatibility break with VNC Enterprise Edition 4.4 and earlier.

Definitions: On this page, a Mac’s “Option/Alt” key is referred to as Opt. Suffixes L and R refer to the left and right variants of keys. Alt refers to the “Alt” key on a PC, Win to the “Windows” key (represented by the Super keysyms over the RFB protocol), and Cmd to the “Command” key on a Mac.

Connecting Mac to non-Mac

Controlling a Mac from a PC keyboard

To emulate on a Mac... From a US PC keyboard, press... From a non-US PC keyboard, press...
 Cmd  AltL or Win  AltL or Win
 Opt  AltR  AltGr
 Opt+Cmd  AltR+Win or AltL+Win  AltL+Win

From a US PC keyboard, AltR+<char> will be interpreted on the Mac to give extended characters.

From a non-US PC keyboard, AltGr+<char> will be interpreted on the PC where possible, so some Mac extended characters may be unavailable. A similar restriction occurs across other VNC Servers - the solution is to either switch to a keyboard layout on the VNC Viewer computer that is capable of producing the required character, or to use the Special Characters dialog, available from the Edit menu of most Mac applications.

If you need to specifically press the left or right Cmd key, AltL maps to CmdL and Win (L or R) to CmdR. OptR can only be produced by changing the parameters from their defaults.

Controlling a PC keyboard from a Mac

To emulate on a PC keyboard... From a Mac keyboard, press...
 AltL  CmdL
 WinL  CmdR

AltR and WinR can only be produced by changing the parameters from their defaults. Opt on the Mac will be interpreted locally to produce extended characters, but will also send the ISO_Level3_Shift keysym for OptL, and for OptR. These keysyms are typically bound to the AltGr key in the X Window system. ISO_Level3_Shift is typically used by newer X installations, Mode_switch by older ones.

RealVNC Connect parameters

Parameter Default value
 LeftCmdKey Alt_L
 LeftOptKey ExtendedChars
 RightCmdKey Super_L
 RightOptKey ExtendedChars

The parameters are the same for RealVNC Viewer and RealVNC Server. Each parameter specifies which keysym should be generated (RealVNC Viewer) or interpreted (RealVNC Server) for the given key on the Mac keyboard. ExtendedChars means that the key should be used to generate extended characters, and will also send the ISO_Level3_Shift keysym (or the Mode_switch keysym for OptR).

Was this article helpful?
10 out of 85 found this helpful

Comments

0 comments

Article is closed for comments.