Arrow keys for project navigation
-
Hi,
I want to use arrow keys for going next or previous projects. So I found and added some custom html and it works nice. I go to next project when I press right key and left for previous. Perhaps this can be added easily to lay theme.
I have Prev and Next links on my page already so I use them to JS click function.
You have to add id to your Next and previous links like #previousarrlink and #nextarrlinkJs:
<script type="text/javascript">
document.addEventListener("keyup",function(e){
var key = e.which||e.keyCode;
switch(key){
//left arrow
case 37:
document.getElementById("previousarrlink").click();
break;
//right arrow
case 39:
document.getElementById("nextarrlink").click();
break;
}
});
</script>Project arrows function can have this as an addition too.
Best. -
Hi dgknkrpnr!
Ah! Sweet! I will tell Armin and will add it in our "list-for-the-future"!
Thank you a lot!
Marius
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login