extends Node

var pid = null

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
    signaller.connect('kb_pressed', Callable(self, 'on_kb_pressed'))


func on_kb_pressed(state):
    if pid:
        OS.kill(pid)
        pid = null
    if state:
        pid = OS.create_process('fly-vkbd', [])
