diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 309dfdc0..8d3ad96a 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -980,7 +980,6 @@ class MainAppWindow: def on_tree_view_key_release(self, view, event): """ Handling keystrokes on release """ key = KeyboardKey(event.hardware_keycode) - print(event.hardware_keycode) if not key: return ctrl = event.state & Gdk.ModifierType.CONTROL_MASK diff --git a/app/ui/main_helper.py b/app/ui/main_helper.py index d49f4887..a36ec6ce 100644 --- a/app/ui/main_helper.py +++ b/app/ui/main_helper.py @@ -67,7 +67,7 @@ def move_items(key, view: Gtk.TreeView): parent_itr = model.iter_parent(model.get_iter(paths[0])) parent_index = model.get_path(parent_itr) children_num = model.iter_n_children(parent_itr) - if key in (KeyboardKey.PAGE_DOWN, KeyboardKey.END): + if key in (KeyboardKey.PAGE_DOWN, KeyboardKey.END, KeyboardKey.END_KP, KeyboardKey.PAGE_DOWN_KP): children_num -= 1 min_path = Gtk.TreePath.new_from_string("{}:{}".format(parent_index, 0)) max_path = Gtk.TreePath.new_from_string("{}:{}".format(parent_index, children_num)) @@ -85,9 +85,9 @@ def move_items(key, view: Gtk.TreeView): else: max_path.prev() move_down(max_path, model, paths) - elif key in (KeyboardKey.PAGE_UP, KeyboardKey.HOME): + elif key in (KeyboardKey.PAGE_UP, KeyboardKey.HOME, KeyboardKey.PAGE_UP_KP, KeyboardKey.HOME_KP): move_up(min_path if is_tree_store else cursor_path, model, paths) - elif key in (KeyboardKey.PAGE_DOWN, KeyboardKey.END): + elif key in (KeyboardKey.PAGE_DOWN, KeyboardKey.END, KeyboardKey.END_KP, KeyboardKey.PAGE_DOWN_KP): move_down(max_path if is_tree_store else cursor_path, model, paths) diff --git a/app/ui/satellites_dialog.py b/app/ui/satellites_dialog.py index 7f60e8e2..95045766 100644 --- a/app/ui/satellites_dialog.py +++ b/app/ui/satellites_dialog.py @@ -305,6 +305,7 @@ class SatellitesDialog: satellite = Satellite(sat[0], sat[-2], sat[-1], transponders) sats.append(satellite) + # ***************** Transponder dialog *******************# class TransponderDialog: diff --git a/app/ui/uicommons.py b/app/ui/uicommons.py index d1983b5d..b3149a61 100644 --- a/app/ui/uicommons.py +++ b/app/ui/uicommons.py @@ -53,6 +53,11 @@ class KeyboardKey(Enum): BACK_SPACE = 22 CTRL_L = 37 CTRL_R = 105 + # Laptop codes + HOME_KP = 79 + END_KP = 87 + PAGE_UP_KP = 81 + PAGE_DOWN_KP = 89 @classmethod def _missing_(cls, value): @@ -62,7 +67,7 @@ class KeyboardKey(Enum): # Keys for move in lists. KEY_KP_(NAME) for laptop!!! MOVE_KEYS = (KeyboardKey.UP, KeyboardKey.PAGE_UP, KeyboardKey.DOWN, KeyboardKey.PAGE_DOWN, KeyboardKey.HOME, - KeyboardKey.END) + KeyboardKey.END, KeyboardKey.HOME_KP, KeyboardKey.END_KP, KeyboardKey.PAGE_UP_KP, KeyboardKey.PAGE_DOWN_KP) class ViewTarget(Enum):