# Calculate append=patch format=patch link=/bootmenu/keymap.config mirror
<reg>([^;\n]+);([^;\n]+);(.*)</reg>
<text>menuentry "\2" {
      commonkeymap "$chosen" \3
}
</text>
<reg>HEADER</reg>
<text>
function commonkeymap {
      echo "Switching to: $1"
      set bootkeymap=$2
      export bootkeymap
      configfile /boot/grub/grub.cfg
}

submenu "Keymap Selection" {
</text>
<reg>FOOTER</reg>
<text>}</text>
