opencomputers.keyboard – OpenComputers keyboard#

This device represents a keyboard, which raises the key_down, key_up and clipboard OpenComputers signals.

Available methods#

This device does not make methods available.

Events#

class opencomputers.keyboard.KeyDownEvent: DeviceEvent#

This event is raised when a key is pressed on the keyboard.

type: string#

Set to "key_down".

code: number#

Numeric value of the pressed key.

player_name: string#

Name of the player who has triggered the event.

class opencomputers.keyboard.KeyUpEvent: DeviceEvent#

This event is raised when a key is released on the keyboard.

type: string#

Set to "key_up".

code: number#

Numeric value of the released key.

player_name: string#

Name of the player who has triggered the event.

class opencomputers.keyboard.ClipboardEvent: DeviceEvent#

This event is raised when a value has been pasted to the physical keyboard out of the game (breaking the fourth wall).

type: string#

Set to "clipboard".

content: string#

Content that was pasted via the keyboard.

player_name: string#

Name of the player who has triggered the event.