diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0c5ee81cc..daea68caa 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -60,7 +60,14 @@
+ android:launchMode="singleTask">
+
+
+
+
+
+
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
index 9a6687f8c..1c291f3b0 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
@@ -261,6 +261,17 @@ class ReaderActivity : BaseRxActivity()
super.onBackPressed()
}
+ override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean {
+ if (keyCode == KeyEvent.KEYCODE_N) {
+ presenter.loadNextChapter()
+ return true
+ } else if (keyCode == KeyEvent.KEYCODE_P) {
+ presenter.loadPreviousChapter()
+ return true
+ }
+ return super.onKeyUp(keyCode, event)
+ }
+
/**
* Dispatches a key event. If the viewer doesn't handle it, call the default implementation.
*/
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt
index 373401ac0..50285aa53 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt
@@ -324,6 +324,7 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
*/
override fun handleKeyEvent(event: KeyEvent): Boolean {
val isUp = event.action == KeyEvent.ACTION_UP
+ val ctrlPressed = event.metaState.and(KeyEvent.META_CTRL_ON) > 0
when (event.keyCode) {
KeyEvent.KEYCODE_VOLUME_DOWN -> {
@@ -340,8 +341,16 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
if (!config.volumeKeysInverted) moveUp() else moveDown()
}
}
- KeyEvent.KEYCODE_DPAD_RIGHT -> if (isUp) moveRight()
- KeyEvent.KEYCODE_DPAD_LEFT -> if (isUp) moveLeft()
+ KeyEvent.KEYCODE_DPAD_RIGHT -> {
+ if (isUp) {
+ if (ctrlPressed) moveToNext() else moveRight()
+ }
+ }
+ KeyEvent.KEYCODE_DPAD_LEFT -> {
+ if (isUp) {
+ if (ctrlPressed) moveToPrevious() else moveLeft()
+ }
+ }
KeyEvent.KEYCODE_DPAD_DOWN -> if (isUp) moveDown()
KeyEvent.KEYCODE_DPAD_UP -> if (isUp) moveUp()
KeyEvent.KEYCODE_PAGE_DOWN -> if (isUp) moveDown()
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index ee073c1fb..d115d6d29 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -401,4 +401,6 @@
Více
Menu
Zdroje
+ Předchozí stránka
+ Následující stránka
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 796a1fa0c..d0431d08d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -719,4 +719,8 @@
Vertical
Both
+
+ Previous page
+ Next page
+
diff --git a/app/src/main/res/xml/s_pen_actions.xml b/app/src/main/res/xml/s_pen_actions.xml
new file mode 100644
index 000000000..d08862818
--- /dev/null
+++ b/app/src/main/res/xml/s_pen_actions.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file