Skip to content

Commit

Permalink
feature: add key 'o' for open the sgf file.
Browse files Browse the repository at this point in the history
the same shortcut function as CTRL+L
  • Loading branch information
xiaoyifang committed Dec 31, 2023
1 parent 98ce47c commit b310d3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion katrain/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ def _on_keyboard_down(self, _keyboard, keycode, _text, modifiers):
self.controls.move_tree.toggle_selected_node_collapse()
elif keycode[1] == Theme.KEY_NEW_GAME and ctrl_pressed:
self("new-game-popup")
elif keycode[1] == Theme.KEY_LOAD_GAME and ctrl_pressed:
elif (keycode[1] == Theme.KEY_LOAD_GAME and ctrl_pressed) or (keycode[1] == Theme.KEY_OPEN_GAME):
self("analyze-sgf-popup")
elif keycode[1] == Theme.KEY_SAVE_GAME and ctrl_pressed:
self("save-game")
Expand Down
1 change: 1 addition & 0 deletions katrain/gui/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class Theme:
KEY_SAVE_GAME = "s"
KEY_SAVE_GAME_AS = "d"
KEY_LOAD_GAME = "l"
KEY_OPEN_GAME = "o"
KEY_SUBMIT_POPUP = ["enter", "numpadenter"]

KEY_ANALYSIS_CONTROLS_SHOW_CHILDREN = "q"
Expand Down

0 comments on commit b310d3c

Please sign in to comment.