mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Comments
This commit is contained in:
@@ -173,10 +173,10 @@ def keypad_read_cb(indev, data):
|
||||
last_state = data.state
|
||||
last_repeat_time = current_time
|
||||
else:
|
||||
pass # not needed as it doesnt help navigating around in the keyboard:
|
||||
#print("No repeat yet, send RELEASED to avoid PRESSING?")
|
||||
#data.state = lv.INDEV_STATE.RELEASED
|
||||
#last_state = lv.INDEV_STATE.RELEASED
|
||||
# This doesn't seem to make the key navigation in on-screen keyboards work, unlike on the m5stack_fire...?
|
||||
#print("No repeat yet, send RELEASED to avoid PRESSING, which breaks keyboard navigation...")
|
||||
data.state = lv.INDEV_STATE.RELEASED
|
||||
last_state = lv.INDEV_STATE.RELEASED
|
||||
|
||||
# Handle ESC for back navigation (only on initial PRESSED)
|
||||
if data.state == lv.INDEV_STATE.PRESSED and data.key == lv.KEY.ESC:
|
||||
|
||||
@@ -16,6 +16,7 @@ Usage:
|
||||
"""
|
||||
|
||||
import lvgl as lv
|
||||
|
||||
from .appearance_manager import AppearanceManager
|
||||
from .widget_animator import WidgetAnimator
|
||||
|
||||
@@ -129,7 +130,14 @@ class MposKeyboard:
|
||||
|
||||
def _handle_events(self, event):
|
||||
code = event.get_code()
|
||||
#print(f"keyboard event code = {code}")
|
||||
|
||||
'''
|
||||
# DEBUG:
|
||||
from .event import get_event_name
|
||||
name = get_event_name(code)
|
||||
print(f"keyboard event code = {code} is {name}")
|
||||
'''
|
||||
|
||||
if code == lv.EVENT.READY or code == lv.EVENT.CANCEL:
|
||||
self.hide_keyboard()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user