fix: keyboard not switching entry
This commit is contained in:
@@ -22,7 +22,6 @@ class Keyboard(Gtk.Box):
|
||||
self.purpose = self.entry.get_input_purpose()
|
||||
|
||||
language = self.detect_language(screen._config.get_main_config().get("language", None))
|
||||
logging.info(f"Keyboard {language}")
|
||||
|
||||
if self.purpose == Gtk.InputPurpose.DIGITS:
|
||||
self.keys = [
|
||||
|
@@ -123,8 +123,6 @@ class Panel(ScreenPanel):
|
||||
)
|
||||
|
||||
def on_icon_pressed(self, entry, icon_pos, event):
|
||||
entry.grab_focus()
|
||||
self._screen.remove_keyboard()
|
||||
if entry.get_input_purpose() == Gtk.InputPurpose.ALPHA:
|
||||
if entry.get_input_hints() in (Gtk.InputHints.NONE, Gtk.InputHints.EMOJI):
|
||||
entry.set_input_purpose(Gtk.InputPurpose.NUMBER)
|
||||
|
10
screen.py
10
screen.py
@@ -1161,18 +1161,18 @@ class KlipperScreen(Gtk.Window):
|
||||
return self.init_tempstore()
|
||||
|
||||
def show_keyboard(self, entry=None, event=None):
|
||||
if self.keyboard is not None:
|
||||
if entry is None:
|
||||
logging.debug("Error: no entry provided for keyboard")
|
||||
return
|
||||
|
||||
if self.keyboard is not None:
|
||||
self.remove_keyboard()
|
||||
entry.grab_focus()
|
||||
kbd_grid = Gtk.Grid()
|
||||
kbd_grid.set_size_request(self.gtk.content_width, self.gtk.keyboard_height)
|
||||
kbd_grid.set_vexpand(False)
|
||||
|
||||
if self._config.get_main_config().getboolean("use-matchbox-keyboard", False):
|
||||
return self._show_matchbox_keyboard(kbd_grid)
|
||||
if entry is None:
|
||||
logging.debug("Error: no entry provided for keyboard")
|
||||
return
|
||||
purpose = entry.get_input_purpose()
|
||||
kbd_width = 1
|
||||
if not self.vertical_mode and purpose in (Gtk.InputPurpose.DIGITS, Gtk.InputPurpose.NUMBER):
|
||||
|
Reference in New Issue
Block a user