I am trying to configure xkb such that Caps Lock is mapped to the Compose key and Shift+Caps Lock functions as the traditional Caps Lock. I put the following in a new file called /usr/share/X11/xkb/symbols/gdwatson:
partial modifier keys xkb_symbols "compose" { key <CAPS> { type[Group1] = "TWO_LEVEL", symbols[Group1] = [ Multi_key, Caps_Lock ] }; }; Then I ran setxkbmap -symbols 'pc+us+gdwatson(compose)', which completed successfully. Caps Lock works as Compose, but Shift+Caps Lock works as Compose instead of Caps Lock. xkbcomp :0.0 reveals the following:
key <CAPS> { type= "TWO_LEVEL", symbols[Group1]= [ Multi_key, Multi_key ] }; The second level symbol mapping is duplicating the first for some reason, rather than the separate value I tried to give it. Does anyone have strong enough xkb-fu to tell me what I've done wrong or how to fix it?
@mirabilosin your response so I notice it) in a comment, then I will delete this comment and write it as an answer (you should then also delete your comment response).partial modifier keysactually bepartial modifier_keys? Without this change,setxkbmap -symbols 'pc+us+gdwatson(compose)'actually exits with an error, but with the change, I get the desired output fromxkbcomp :0.0. However I get the undesired side-effect that pressing Capslock simultaneously puts me in Capslock mode and compose key mode.