I use a Danish and English (US) keyboard layout, on a keyboard with Nordic geometry, meaning it has a less/greater key. I use the Danish layout for leisure, and the English (US) for work.
I would like this key to be Compose only when I am using the English (US) layout.
Similarly I would like Caps Lock and Escape to swap under those same circumstances.
That is, I need this functionality switch to "conceptually depend" on the keyboard layout widget's state. Which probably means I have to do something in XKB.
Is this possible? How?
Additional information:
~$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules: evdev
model: pc105
layout: dk,us
variant: ,
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete
symbols: pc+dk+us:2+inet(evdev)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+dk+us:2+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
};