struct

Phosphor::SubRule

Inherits Struct < Value < Object

Describes which events a subscribed widget receives regardless of focus.

Create via SubRule.key(key_string) to match a specific key. Additional rule types (mouse buttons, event types) can be added in later phases.

Constructors

key(key_string : String) : SubRule

Returns a SubRule that matches a KeyEvent whose key is key_string.

Supported format: "ctrl+<letter>" (e.g. "ctrl+c", "ctrl+z").

Source
new(key : Key)
Source

Instance methods

matches?(event : Event) : Bool

Returns true if event satisfies this rule.

Source