Support Center

Recent questions

About Koken

This Help Center provides support for Koken, a free content management system designed for photographers, artists and designers.

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

koken:keyboard_scroll – is it possible to use up/down keys instead of left/right?

Bernhard Hörlberger

Dec 13, 2014 12:43PM EST

Hi there,

I'm currently putting together my portfolio site, and was wondering if it is possible to have the koken:keyboard_scroll tag use the up/down arrows instead of left/right?

I'm already using the left/right arrow keys to navigate to the previous/next album using the koken:link tag and the bind_to_key attribute and I feel like the up/down keys make more sense to scroll up/down within a given album.

Thanks a bunch in advance for your help!

Up 0 rated Down

Todd Dominey Koken Agent

Dec 17, 2014 05:09PM EST

Bernhard – sorry but there isn’t a way to change which keys are bound there. I think your best bet here might be rolling your own javascript instead of trying to use our tag.

Up 0 rated Down

Bernhard Hörlberger

Dec 18, 2014 08:21AM EST
Hi Todd,

Thanks a bunch for the reply... and thanks for koken! it's absolutely priceless!
I did some digging about and found that changing this in koken.js roundabout keyboard.scroll.init:

function(t) {
- 1 !== $.inArray(t.which, [37, 39]) && $K.keyboard.scroll.move(39 === t.which)
})

to this:

function(t) {
- 1 !== $.inArray(t.which, [38, 40]) && $K.keyboard.scroll.move(40 === t.which)
})

did the trick for me...

I'm terrible at all kinds of code, but I'm thinking that maybe it might be possible to have koken:keyboard_scroll accept values for the previous & next keys somehow... I'll report back if I figure anything out
Up 0 rated Down

Todd Dominey Koken Agent

Dec 18, 2014 12:58PM EST

Bernhard – cool. Keep in mind though that any edits to Koken’s core files may be overwritten / lost when the system upgrades, so in order to keep this edit you may need to reapply the change after each upgrade.

This question has received the maximum number of answers.

support@koken.me
http://assets1.desk.com/
false
koken
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete