[question] defining multiple keysyms for one keycode
In libxkbcommon
, there is xkb_state_key_get_syms()
function which does following:
int xkb_state_key_get_syms ( struct xkb_state * state,
xkb_keycode_t key,
const xkb_keysym_t ** syms_out
)
Get the keysyms obtained from pressing a particular key in a given keyboard state.
....
As an extension to XKB, this function can return more than one keysym. If you do not want to handle this case, you can use
The question arises how to define more than one keysym for a key in XKB config?
Should I define it in a such way, duplicating key
definition?
xkb_symbols {
key <LWIN> { [ ISO_First_Group ] };
key <LWIN> { [ Super_L ] };
modifier_map Mod3 { Super_L };
}
Can I assign different actions for the keysyms of a key afterwards?
xkb_compatibility {
interpret ISO_First_Group { action = SetGroup(group=1); };
interpret Super_L { action = SetMods(modifiers=Mod3); };
}
How it's supposed to work?
Edited by Andrey