Hi folks,
thanks to @MaxWaldorf the new forum comes with a plugin which allows easy “hands off the mouse” keyboard shortcuts for several forum functions.
Please find below the list of keyboard shortcuts I’ve been able to find so far, and please feel free to add any others you may come across.
Alt-t: open “tag” page
Alt-p: open “popular” page
Alt-g: open “groups” page
Alt-o: open “options” (profile) page?
Alt-s: open “users” page
Alt-h: open “home” / “categories” page
Alt-n: open “notifications” page
“?”: open nodeBB keyboard plugin “Help” page
j / k: move up / down in the list of topics / replies
Alt-u: List of unread topics
Alt-r: List of recently changed topics
r: reload page
t / b: go to top / bottom of page
Alt-Enter: Reply to topic / post
Ctrl-Enter: Send reply (use in post editor)
Enter: enter / display topic
Backspace: Up one level (back to topic list)
Alt-c: Open chat screen
If you would like to remap these shortcuts to other keys (or maybe you have been using my greasemonkey script on the old forum pages for easy keyboard navigation), then I have good news for you: A customized version of this script is also available for greasemonkey / tampermonkey on all half-way modern browsers which will bring back all the old keyboard mappings to the way they worked on the old forum.
You can find the script here:
https://greasyfork.org/en/scripts/433433-nodebb-remap-shortcuts
I’ve also included the source code below (make sure to replace “hoover” with your username for the chat shortcut to work as described in the comment).
// ==UserScript==
// @name nodeBB remap shortcuts
// @namespace https://hoover.gplrank.de/
// @description remaps various nodeBB keyboard shortcuts to simple keypresses
// @description author: hoover
// @description You'll need to replace "hoover" with your forum username for the "chat" link to work below.
// @include http*://forum.falcon-bms.com/*
//
// @version 0.0.2.20211018140000
// ==/UserScript==
function findTopicLink()
{
var anchors = document.getElementsByTagName('a');
var href="/unread";
for (var i = 0 ; i < anchors.length ; i++) {
href = anchors[i].getAttribute('href');
if (href) {
if(href.match(/topic/)) {
return(href);
break ;
}
}
}
}
var key_map = {
"N" : "/unread",
"R": "/recent",
"P": "/popular",
"H": "/",
"C": "/user/hoover/chats",
"S": "/search",
"M": "/notifications",
"G": findTopicLink()
}
// stolen shamelessly from userscript.org's facebook key navigation
// Thanks to Droll Troll
function OnKeyUp(e)
{
if (String.fromCharCode(e.keyCode) in key_map &&
(typeof e.target.type == "undefined" || (e.target.type != "text" && e.target.type != "textarea")) &&
!e.altKey && !e.ctrlKey && e.keyCode <= 90)
{
window.location.replace(key_map[String.fromCharCode(e.keyCode)])
}
}
window.addEventListener("keyup",function(event) { OnKeyUp(event); },false)
All the best & I hope you enjoy’ll enjoy easy, hands-off-the-mouse keyboard navigation from now on
Uwe