XKB: purpose of virtualMods=... in symbols files

Maxim Levitsky maximlevitsky at gmail.com
Fri Aug 28 07:46:43 PDT 2009

I currently am trying to understand how XKB works.

I pretty much understand most of it, descriptions on 

and the wonderful.

Ability to retrieve current xkb configuration using xkbcomp makes it
even easier.

I don't understand the purpose of virtualMods= in symbol files.

I was able to make use of this statement, but only like that:
        actions= [SetMods(modifiers=Vmod)]

As this allows to set a virtual modifier from a symbol declaration.
(but this feature isn't used at all)

However, standalone virtualMods= doesn't do anything, so why it is
present in many symbol files, like:

// Both Ctrls pressed together toggle group
partial modifier_keys
xkb_symbols "ctrls_toggle" {
  virtual_modifiers LControl, RControl;
    key <LCTL> {
	symbols[Group1]= [ NoSymbol,	ISO_Prev_Group ],
	virtualMods= LControl
    key <RCTL> {
	symbols[Group1]= [ NoSymbol,	ISO_Next_Group ],
	virtualMods= RControl

Best regards,
	Maxim Levitsky

More information about the xorg mailing list