Keys

APIRendererItemKeys

Rectangle {
    width: 100
    height: 100
    color: 'green'
    keys.focus: true
    keys.onPressed: function(){
        this.color = 'red';
    }
    keys.onReleased: function(){
        this.color = 'green';
    }
}

Source

Keys.focusedItem

Type:
Item

Source

Class Keys.Event

Extends:
Device.KeyboardEvent

Source

Keys::onPress(event)

Parameters:
  • event — Item.Keys.Event
Type:
Signal

Keys::onHold(event)

Parameters:
  • event — Item.Keys.Event
Type:
Signal

Keys::onRelease(event)

Parameters:
  • event — Item.Keys.Event
Type:
Signal

Keys::onInput(event)

Parameters:
  • event — Item.Keys.Event
Type:
Signal

Source

Keys::focus

Type:
Boolean
Default value:
false

Keys::onFocusChange(oldValue)

Parameters:
  • oldValue — Boolean
Type:
Signal

Source

Keys.event

Type:
Item.Keys.Event

Source