Reply to topic

Okular: change pages with left/right arrow keys

26

Votes
32
6
etter
Registered Member
Posts
2
Karma
0
I have implemented the following patch:

Current behavior:
When you press the right arrow key while viewing a document and the whole width fits on the screen, Okular currently just ignores your input.

New behavior:
If you press right and there is no horizontal scroll bar, it will advance to the next page. If you have chosen a "Facing" view mode, it will advance 2 pages per key press.

Why another command besides PageDown?
The difference between this and using PageDown is that PageDown just moves your document one height of your viewport. The proposed solution moves one page which means that the top-left corner of your page will always be aligned with the top-left corner of your viewport.


Of course this is also implemented for the left arrow key, where we just move to the previous page.

The patch can be found at https://git.reviewboard.kde.org/r/104596/
User avatar mck182
KDE Developer
Posts
107
Karma
0
OS
I'm not sure. Thinking about it raises couple points in my head:

  • maybe it should be the other way around? "Page Down" should move you to the next page (that's what the key says after all)
  • the behavior will be significantly different with different pdfs - once it will move just a little bit horizontally, then with other pdf/zoom ratio it will jump one whole page which might be confusing to the user (and you have no easy way to return it if you do it by accident - pressing up arrow can be reversed by down arrow, page up by page down etc, the left/right in "new-page-mode" can't be reversed and you'll have to scroll manually to the initial position...not a big deal, but annoying)
  • It also makes the arrow keys behave differently among themselves - up/down arrows moves just the little bit while the left/right will move a lot while it should have the same "weight" (the ignoring that's there right now seems more consistent imho)

Just my 2 cents..


KDE Telepathy lead developer
kleag
Registered Member
Posts
5
Karma
0
OS
mI agree with the problems raised by mck182 but I also want this feature since a long time. So, maybe, other keys should be chosed ?
Arrows or PgUp/PgDw with a modifier ?
syamcr
Registered Member
Posts
1
Karma
0
Well, I believe the arrow key navigation works in Adobe Reader too. As far as I can remember, in Adobe Reader, if you have a page openend and zoomed in, Page-up/page-down keys would navigate by view-ports and left/right arrow keys would change pages.

It will be a good idea to implement this with arrow keys in Okular since its the same scheme as Adobe Reader (the most popular PDF app on Windows).
User avatar manasij7479
Registered Member
Posts
52
Karma
0
OS
If technically possible, I think it is better to modify the shortcut configuration system to allow the user to control what the arrow keys (and some others ) are used for, within the context of the program.


Manasij Mukherjee @ Arch Linux | gcc-4.9.2 | Plasma 5.2
yoda
Registered Member
Posts
23
Karma
0
OS
More important question: how about left/right arrow is handled with other kde applications? You need to think globally people, for instance in gwenview right/left is doing the same: vote yes! There is so much hotkey mess in kde world...
mutlu
Registered Member
Posts
73
Karma
0
OS
I agree with the proposed behavior change. I have been wishing for this for a while. Many other readers do it and many users (I believe) are used to this when coming to Okular. More importantly, however, is that advancing one page is probably the single most used command in Okular and many modern keyboards (on notebooks, netbooks, bluetooth keyboards, etc.) hide the PageUp and PageDown keys in ridiculous places, making the current keyboard navigation painful.
User avatar poomerang
Registered Member
Posts
65
Karma
0
OS
I like the idea, a one-page sliding button is needed and IMHO can't be PgDn or PgUp since this would break the usual way they work in all other programs.
yet, it might be a bit confusing when the behavior of Left/Right pressing depends on the level of zoom on the page
quamis
Registered Member
Posts
3
Karma
0
OS
+1 for manasij7479
This should be user-customisable. I prefer pg-up/down to change photo when browsing photos, but i expect left/right arrow to pan the current view, so i'd oppose this. If it would be configurable on the other hand, i'd have no problem with it.
User avatar poomerang
Registered Member
Posts
65
Karma
0
OS
quamis wrote:+1 for manasij7479
This should be user-customisable. I prefer pg-up/down to change photo when browsing photos, but i expect left/right arrow to pan the current view, so i'd oppose this. If it would be configurable on the other hand, i'd have no problem with it.

correct me if i'm wrong, but nearly all shortcuts are customizable in kde programs already, so there is quite good chances these buttons will be as well, and we're only talking of the default behaviour
User avatar manasij7479
Registered Member
Posts
52
Karma
0
OS
poomerang wrote:correct me if i'm wrong, but nearly all shortcuts are customizable in kde programs already, so there is quite good chances these buttons will be as well, and we're only talking of the default behaviour

You are correct.
They are supported, I can't believe I missed that, though !
(Based on the comments on the patch's submitted page itself, it appears that the current default behaviour is on purpose.)
http://imgur.com/dCc2F
[Edit] I should have taken the screenshot by configuring "Next Page" for "Right", but "Left" proves the point. [/Edit]


Manasij Mukherjee @ Arch Linux | gcc-4.9.2 | Plasma 5.2

 
Reply to topic

Bookmarks



Who is online

Registered users: alindichris, Baidu [Spider], Bing [Bot], bobthebuilder, cloose, cristian.onet, davidemme, Exabot [Bot], Google [Bot], ken300, koriun, Majestic-12 [Bot], MakerMani, Saabhero, Sogou [Bot], spleen, stephanearrami, Steve Guilford, vpinon, Yahoo [Bot]