Partially supporting 한글 (hangul, Korean characters) (#2533)

* Partially supporting 한글 (hangul, Korean characters)

* Externalized korean shortcuts to separate function

* formatting
This commit is contained in:
Christopher Woggon 2023-06-07 13:54:52 +09:00 committed by GitHub
parent e3b634a805
commit fadeb99c99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -479,6 +479,26 @@ class Reviewer:
# Handlers
############################################################
def korean_shortcuts(
self,
) -> Sequence[Union[tuple[str, Callable], tuple[Qt.Key, Callable]]]:
return [
("", self.mw.onEditCurrent),
("", self.showContextMenu),
("", self.replayAudio),
("Ctrl+Alt+ㅜ", self.forget_current_card),
# does not work
# ("Ctrl+Alt+ㄷ", self.on_create_copy),
# does not work
# ("Ctrl+Shift+ㅇ", self.on_set_due),
("", self.onReplayRecorded),
("Shift+ㅍ", self.onRecordVoice),
("", self.onOptions),
("", self.on_card_info),
("Ctrl+Alt+ㅑ", self.on_previous_card_info),
("", self.mw.undo),
]
def _shortcutKeys(
self,
) -> Sequence[Union[tuple[str, Callable], tuple[Qt.Key, Callable]]]:
@ -517,6 +537,7 @@ class Reviewer:
("5", self.on_pause_audio),
("6", self.on_seek_backward),
("7", self.on_seek_forward),
*self.korean_shortcuts(),
]
def on_pause_audio(self) -> None: