I have a Macbook Pro Intel with a FR asserted keyboard. When i create linux VM on virtual box I never manage to have the right keyboard layout. Most of the keys work well excepted the §, @ - ... and a few symbol keys like |

Today I starting to find a solution

setxkbmap -model macbook79

this make most of the key fork, excepted |

To make it permanent, I have edit the file /etc/X11/xorg.conf.d/00-keyboard.conf

/// Section "InputClass"

       Identifier "system-keyboard"
       MatchIsKeyboard "on"
       Option "XkbLayout" "mac-fr"
       Option      "XkbModel"       "macbook79"

EndSection ///

that still not perfect, but it's better

Edit : | pipe is working !!! but only with right ALT key :)