This is where that second hexadecimal number in each keymap rule is useful. It allows you to specify an alternate Linux event code plus any combination of Shift, Alt, AltGr, Ctrl, or Fn. F(x)tec moved the yellow labels around in ways that can't be matched by only rearranging the keys, and tdm gave us another layer in the kernel to fix this 🙂 Say the yellow label was 'Å', but the .kcm file defined that as 'AltGr + some other key'. You would define the last number in the keymap rule to be that other key, but with the 'AltGr' flag set as well, e.g.
key_code | KF_ALTGR == key_code | 0x1000