This question is answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 6 - Pages: 1 - Last Post: 28 Jun 26, 08:47 Last Post By: MarkusD Threads: [ Previous | Next ]
MarkusD

Posts: 905
Registered: 13-Apr-2006
Shortcuts for navigation?
Posted: 12 May 26, 14:32
 
  Click to reply to this thread Reply
Hi Laza,

my original post is locked.
https://jalbum.net/forum/thread.jspa?threadID=60248

Yes, I can add Ctrl-PgUp and Ctrl-PgDn to navigate to the previous/next folder. Isn't that used for another purpose? That's used for the Previous / Next tab in Chrome, as I see

Yes, Ctrl-PgUp and Ctrl-PgDn aren't a good idea, but <Ctrl><Left> and <Ctrl><Right> would be good, because I don't see any conflicts.

Thanks
Laza

Posts: 1,555
Registered: 6-Sep-2005
Re: Shortcuts for navigation?
Posted: 22 Jun 26, 15:22   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Can you please write down what would you like to use Ctrl-Left and Right?
MarkusD

Posts: 905
Registered: 13-Apr-2006
Re: Shortcuts for navigation?
Posted: 23 Jun 26, 08:37   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
Can you please write down what would you like to use Ctrl-Left and Right?
Please look at the attached screenshot.

Sample page

Thx.
Laza

Posts: 1,555
Registered: 6-Sep-2005
Re: Shortcuts for navigation?
Posted: 27 Jun 26, 09:35   in response to: MarkusD in response to: MarkusD
Helpful
  Click to reply to this thread Reply
Ctrl-Left and Ctrl-Right are not allowed to take over, but what about Shift-Left and Shift-Right? That's available when the focus is not in a text box. I'm afraid, though, this feature will be used only by you, as who'd guess they can use these key combos for this purpose.
MarkusD

Posts: 905
Registered: 13-Apr-2006
Re: Shortcuts for navigation?
Posted: 27 Jun 26, 09:58   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Interesting list, may I ask where this list is from?

Laza wrote:
Ctrl-Left and Ctrl-Right are not allowed to take over, but what about Shift-Left and Shift-Right?
The list says „Word jump in text fields“. OK, but this is not true for any page of a Tiger album, isn't it?

Laza wrote:
That's available when the focus is not in a text box. I'm afraid, though, this feature will be used only by you, as who'd guess they can use these key combos for this purpose.
Before I started this thread I looked in the Tiger source code to find out where shortcuts are implemented so I'm able to alter the code for my self. This wouldn't be the first time and I'm totally fine with that. If you can point me to the code where I can add code myself I would be very happy. Thanks.
Laza

Posts: 1,555
Registered: 6-Sep-2005
Re: Shortcuts for navigation?
Posted: 27 Jun 26, 13:49   in response to: MarkusD in response to: MarkusD
Helpful
  Click to reply to this thread Reply
It's Claude AI.

You can simply add the following code to the Settings / Advanced / Custom code / Javascript box:
$(document).on("keydown.folderNav", function (e) {
    if (e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey) {
        var tag = (document.activeElement || document.body).tagName.toLowerCase();
        if (tag === "input" || tag === "textarea" || tag === "select") return true;
        if (e.which === 37) {
            e.preventDefault();
            navigateTo('.previous-link>a');
        } else if (e.which === 39) {
            e.preventDefault();
            navigateTo('.next-link>a');
        }
    }
    return true;
});
function navigateTo(hook) {
    var link = $(hook);
    if (link.length) {
        window.location.href = link[0].href;
    }
}
MarkusD

Posts: 905
Registered: 13-Apr-2006
Re: Shortcuts for navigation?
Posted: 28 Jun 26, 08:47   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Thanks Laza! That works fine.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums