Skip to content
cajhin edited this page Jan 1, 2021 · 4 revisions

COMBO keyLabel [modstring] > function()

or

COMBO deadkey-DK keyLabel [modstring] > function()

deadkey-DK : optional. DK: any real key label. See Function: deadkey()

keyLabel : any key. (New in v70: real modifiers are now possible, too)

modstring : see Modifier Strings

function : any function like Function: key() or Function: altChar()

Use keyword COMBO to define anything beyond simple key A>B mappings.

An incoming key matches a combo IF

  • no other combo has matched before
  • there is no active deadkey and no deadkey-DK defined, OR the active deadkey = DK
  • key event = key down
  • incoming key = keyLabel
  • state of all modifiers matches with modstring

If the key matches the combo, the function() is triggered.
No other combos or alpha mappings will be evaluated.

Examples

MOD9 + J (with MOD10-12 up) results in cursor left :

COMBO J [^^^& .... ....] > key(LEFT)

Only when the deadkey "C" is active, and both Shift are up, then e results in ê :

COMBO deadkey-C E [...^ ...^] > altChar(0234) # AltGr 0234 = ê

See the file capsicain.example.ini and capsicain.cajhin.ini for a ton of examples.