Documentation ¶
Index ¶
Constants ¶
View Source
const ( KTstandardChar = 0 KTcarriageReturn = 1 KTbackspace = 2 KTdelete = 3 KTcapsLock = 4 KTcontrol = 5 KTalt = 6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
type KeyMap struct { Lang string `json:"lang"` KBmargins struct { Top float64 `json:"top"` Bottom float64 `json:"bottom"` Left float64 `json:"left"` Right float64 `json:"right"` } `json:"kbMargins"` TotalKeyWidth float64 `json:"totalKeyWidth"` TotalRowHeight float64 `json:"totalRowHeight"` Rows []struct { RowHeight float64 `json:"rowHeight"` Keys []struct { IsPadding bool `json:"isPadding"` KeyType int `json:"keyType"` KeyWidth float64 `json:"keyWidth"` Char string `json:"char"` } `json:"keys"` } `json:"rows"` }
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row contains the height, and all the keys in the row.
type VirtKeyboard ¶
type VirtKeyboard struct { StartCoords coords // contains filtered or unexported fields }
VirtKeyboard contains the entire virtual keyboard, and the methods required to generate one from a keymap file
func New ¶
func New(km *KeyMap, fbWidth, fbHeight int) (*VirtKeyboard, error)
New initilizes a VirtKeyboard for use
func (*VirtKeyboard) CreateIMG ¶
func (v *VirtKeyboard) CreateIMG(savePath, fontPath string)
CreateIMG generates an image from the current keyboard.CreateIMG The current implementation saves the image as a PNG. This behaviour may change in the future to return an RBGA image
func (*VirtKeyboard) GetLabel ¶
func (v *VirtKeyboard) GetLabel(kt int) string
GetLabel returns a label for "special" keys
func (*VirtKeyboard) GetPressedKey ¶
func (v *VirtKeyboard) GetPressedKey(inX, inY int) (Key, error)
GetPressedKey uses the coordinates provided to determine which key was pressed, and returns the key
Click to show internal directories.
Click to hide internal directories.