softkeyboard¶
CircuitPython software defined keyboard for touch displays using displayio GridLayout.
Author(s): Tim Cocks, DJDevon3
Implementation Notes¶
Hardware:
Any touch capable display
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
- class softkeyboard.softkeyboard.SoftKeyboard(*args: Any, **kwargs: Any)¶
CircuitPython software defined keyboard for touch displays using displayio GridLayout.
- Parameters:
x (int) – x location the layout should be placed. Pixel coordinates.
y (int) – y location the layout should be placed. Pixel coordinates.
width (int) – Width of the layout in pixels.
height (int) – Height of the layout in pixels.
character_font (str) – Font for normal characters (terminalio.FONT)
symbol_font (str) – Font for symbol characters (forkawesome_font)
keypress_cooldown (float) – Time in seconds for keypress debounce.
highlight_duration (float) – Time in seconds for label highlight during touch
allow_sticky_repeat (bool) – Assistive sticky keys capability boolean
layout_file (str) – Filename for JSON layout. None defaults to default_layout.json
- check_touches(touch_point)¶
Check the touch events and process any keys that have been pressed. :param touch_point: tuple (x, y) coordinates of touch event :return: The value of the key that was pressed. Either string or int.
- property height¶
The height of the layout :return:
- property width¶
The width of the layout :return: