You're making several wrong assumptions: that X ignores udev (it doesn't); that udev directly intervenes in keyboard mappings (it only sets them up, beyond that it's the kernel acting); that X is based on Linux (it runs on other unix variants as well).
Udev only plays a very limited role in keyboard handling: it detects specific keyboard models and declares their vendor-specific keys. Udev doesn't act on standard keys like A and F1, only on vendor-specific keys like Brightness up or Wifi on/off (usually marked by icons). These keys are typically not used by application, but mapped to ACPI events.
The Linux kernel has its own mapping scheme for the usual keys, which you can set with the loadkeys
command. If you have multiple keyboards plugged in, the settings performed by udev are specific to one keyboard, whereas loadkeys
acts on the global kernel keymap.
The kernel's keyboard mappings don't cover nearly all the nuances afforded by X. So X has its own scheme and for the most part ignores kernel settings. X does take the keyboard-specific mappings set up through udev into account.
udev
can set up keymaps for input devices, but basically it configures the input layer (stuff in/dev/input
), it doesn't actively participate in it once set up.