Scenes Documentation Beta

Protocol Key​Down​Handler

public protocol KeyDownHandler : EventHandler 

A type conforming to KeyDownHandler is capable of receiving key down events through the onKeyDown method.

Before receiving events, it must be registered with the dispatcher via the registerKeyDownHandler method. Similarly, it should be unregistered before deinitialization via the unregisterKeyDownHandler method available through the dispatcher.

%123 KeyDownHandler KeyDownHandler EventHandler EventHandler KeyDownHandler->EventHandler

Conforms To

EventHandler

An Eventhandler is a type capable of being registered with the Dispatcher to receive events of a certain type.

Requirements

on​Key​Down(key:​code:​ctrl​Key:​shift​Key:​alt​Key:​meta​Key:​)

func onKeyDown(key:String, code:String, ctrlKey:Bool, shiftKey:Bool, altKey:Bool, metaKey:Bool)