### 2.4 AltGr Keys ¶

StumpWM uses the CLX client library for X11, which doesnt support the XKB extension. As such support for Alt Graph must be handled specially.

Preliminary support for Alt Graph in StumpWM is done by registering AltGr as a modifier key and specially handling it when it is a member of a key press’ state. By default StumpWM treats AltGr key presses as a normal key and not a modifier, and this behavior should not be changed unless necessary. To enable treating AltGr as a modifier, the user must place the following in their stumpwmrc:

    (register-altgr-as-modifier)

Additionally, the variable *altgr-offset* defaults to 2, which may be appropriate for the users keyboard layout, or may not. Some users may have an AltGr offset of 4, or potentially 6. If, after calling `register-altgr-as-modifier`, keys on AltGr aren’t being registered properly, then the offset may need to be changed. The user can check this explicitly by finding a keysym that requires AltGr and passing it to `keysym-requires-altgr`. As an example, some layouts have `ł` on `AltGr+l`. In such a case, the following example would return true when *altgr-offset* is correct:

    (stumpwm::keysym-requires-altgr
      (stumpwm::stumpwm-name->keysym "lstroke"))

Function: register-altgr-as-modifier ¶

  Register the keysym(s) for ISO_Level3_Shift as modifiers.

Variable: *altgr-offset* ¶

  The offset of altgr keysyms. Often 2 or 4, but always an even number.