#module \
Keyboard

#deffunc local \
Show
	showing = True
	text = ""

	Return

#deffunc local \
Hide
	showing = False

	Return

#defcfunc local \
GetChar \
		local	l_ids,\
		local	l_touchInfo,\
		local	l_charId,\
		local	l_char
	if showing = False {
		Return ""
	}

	MTList l_id

	If stat = 0 {
		Return ""
	}

	MTInfo l_touchInfo, l_id.0

	If l_touchInfo.2 < 1920 - 480 {
		Return ""
	}

	l_charId = (1080 - l_touchInfo.1) / 96 * 5 + (l_touchInfo.2 - (1920 - 480)) / 96

	NoteSel charDict@Char
		NoteGet l_char, l_charId
		text += l_char
	NoteUnsel

	Return ""

#deffunc local \
Draw
	If showing = False {
		Return
	}

	Color COLOUR_BLACK
	BoxF 0, 1920 - 480, 1080, 1920

	Repeat 50
		Pos 1080 - 96 * (cnt / 5 + 1), 1920 - 480 + 96 * (cnt \ 5)
		CelPut BUFFER_CHAR, cnt, 3, 3
	Loop

	Return

#global

