GdkX11.X11Keymap.prototype.key_is_modifier

function key_is_modifier(keycode: Number(guint)): Boolean {
    // Gjs wrapper for gdk_x11_keymap_key_is_modifier()
}
  

Determines whether a particular key code represents a key that is a modifier. That is, it’s a key that normally just affects the keyboard state and the behavior of other keys rather than producing a direct effect itself. This is only needed for code processing raw X events, since Gdk.EventKey directly includes an is_modifier field.

Since 3.6

keycode

the hardware keycode from a key event

Returns

true if the hardware keycode is a modifier key