Skip to content

Commit

Permalink
#20 Speak selected text by MetaLeft key
Browse files Browse the repository at this point in the history
  • Loading branch information
filimo committed Oct 1, 2019
1 parent f993203 commit c055e48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ReaderTranslator/Components/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ extension PageWebView: WKScriptMessageHandler {
print("onBodyLoaded")
case "onKeyPress":
if let code = message.body as? String {
if code == "Space" { SpeechSynthesizer.speech() }
if code == "MetaLeft" { SpeechSynthesizer.speech() }
}
default:
print("webkit.messageHandlers.\(message.name).postMessage() isn't found")
Expand Down

0 comments on commit c055e48

Please sign in to comment.