|
|
@ -329,7 +329,7 @@ class ReadBookActivity : BaseReadBookActivity(), |
|
|
|
* 按键事件 |
|
|
|
* 按键事件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean { |
|
|
|
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean { |
|
|
|
if (menuLayoutIsVisible) { |
|
|
|
if (menuLayoutIsVisible && !getPrefBoolean("disableReturnKey")) { |
|
|
|
return super.onKeyDown(keyCode, event) |
|
|
|
return super.onKeyDown(keyCode, event) |
|
|
|
} |
|
|
|
} |
|
|
|
when { |
|
|
|
when { |
|
|
@ -367,6 +367,11 @@ class ReadBookActivity : BaseReadBookActivity(), |
|
|
|
binding.readView.pageDelegate?.keyTurnPage(PageDirection.NEXT) |
|
|
|
binding.readView.pageDelegate?.keyTurnPage(PageDirection.NEXT) |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
keyCode == KeyEvent.KEYCODE_BACK -> { |
|
|
|
|
|
|
|
if (getPrefBoolean("disableReturnKey")) { |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return super.onKeyDown(keyCode, event) |
|
|
|
return super.onKeyDown(keyCode, event) |
|
|
|
} |
|
|
|
} |
|
|
|