{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

PointerKeyboardModifiers

value public final class PointerKeyboardModifiers


Contains the state of modifier keys, such as Shift, Control, and Alt, as well as the state of the lock keys, such as Caps Lock and Num Lock.

Summary

Public constructors

Extension functions

final boolean

true when the AltGraph key is pressed.

final boolean

true when the Alt key is pressed.

final boolean

true when the keyboard's Caps Lock is on.

final boolean

true when the Control key is pressed.

final boolean

true when the Function key is pressed.

final boolean

true when the Meta key is pressed.

final boolean

true when the keyboard's Num Lock is on.

final boolean

true when the keyboard's Scroll Lock is on.

final boolean

true when the Shift key is pressed.

final boolean

true when the Sym key is pressed.

Public constructors

PointerKeyboardModifiers

public PointerKeyboardModifiers(
    @NonNull NativePointerKeyboardModifiers packedValue
)

Extension functions

PointerEventKt.isAltGraphPressed

public final boolean PointerEventKt.isAltGraphPressed(
    @NonNull PointerKeyboardModifiers receiver
)

true when the AltGraph key is pressed.

PointerEventKt.isAltPressed

public final boolean PointerEventKt.isAltPressed(@NonNull PointerKeyboardModifiers receiver)

true when the Alt key is pressed. This is commonly associated with the Option key on some keyboards.

PointerEventKt.isCapsLockOn

public final boolean PointerEventKt.isCapsLockOn(@NonNull PointerKeyboardModifiers receiver)

true when the keyboard's Caps Lock is on.

PointerEventKt.isCtrlPressed

public final boolean PointerEventKt.isCtrlPressed(
    @NonNull PointerKeyboardModifiers receiver
)

true when the Control key is pressed.

PointerEventKt.isFunctionPressed

public final boolean PointerEventKt.isFunctionPressed(
    @NonNull PointerKeyboardModifiers receiver
)

true when the Function key is pressed.

PointerEventKt.isMetaPressed

public final boolean PointerEventKt.isMetaPressed(
    @NonNull PointerKeyboardModifiers receiver
)

true when the Meta key is pressed. This is commonly associated with the Windows or Command key on some keyboards.

PointerEventKt.isNumLockOn

public final boolean PointerEventKt.isNumLockOn(@NonNull PointerKeyboardModifiers receiver)

true when the keyboard's Num Lock is on.

PointerEventKt.isScrollLockOn

public final boolean PointerEventKt.isScrollLockOn(
    @NonNull PointerKeyboardModifiers receiver
)

true when the keyboard's Scroll Lock is on.

PointerEventKt.isShiftPressed

public final boolean PointerEventKt.isShiftPressed(
    @NonNull PointerKeyboardModifiers receiver
)

true when the Shift key is pressed.

PointerEventKt.isSymPressed

public final boolean PointerEventKt.isSymPressed(@NonNull PointerKeyboardModifiers receiver)

true when the Sym key is pressed.