handler_key_press Subroutine

private subroutine handler_key_press(self, window, key, modifiers, handled)

A key was pressed: key (a character's code, iachar('v'), or KEY_), with the modifier keys held (MOD_ bits). Set handled (false on entry) to skip the built-in key's action.

Type Bound

WindowEventHandler

Arguments

Type IntentOptional Attributes Name
class(WindowEventHandler), intent(inout) :: self
class(WindowProxy), intent(inout) :: window

the window of the event

integer, intent(in) :: key

a character code or KEY_; MOD_ bits

integer, intent(in) :: modifiers

a character code or KEY_; MOD_ bits

logical, intent(inout) :: handled

(true: skip the built-in key)


Called by

proc~~handler_key_press~~CalledByGraph proc~handler_key_press WindowEventHandler%handler_key_press proc~dispatch_event dispatch_event proc~dispatch_event->proc~handler_key_press proc~dispatch_events dispatch_events proc~dispatch_events->proc~dispatch_event proc~frame WindowProxy%frame proc~frame->proc~dispatch_events proc~resize WindowProxy%resize proc~resize->proc~frame proc~run WindowProxy%run proc~run->proc~frame

Source Code

    subroutine handler_key_press(self, window, key, modifiers, handled)
        class(WindowEventHandler), intent(inout) :: self
        class(WindowProxy), intent(inout) :: window         !! the window of the event
        integer, intent(in) :: key, modifiers               !! a character code or KEY_*; MOD_* bits
        logical, intent(inout) :: handled                   !! (true: skip the built-in key)
    end subroutine handler_key_press