Customize Shortcut Keys
Advanced users should be able to change shortcut keys (e.g. win+up to move a bullet up). It's especially useful for those switching machines (e.g. from mac to windows)
-
Hi Max,
Here's a TamperMonkey (or similar extension) script – courtesy of @rawbytz) – you can use to achieve exactly what you've proposed:
// ==UserScript==
// @name WorkFlowy Reclaim Chrome Back/Forward
// @namespace https://rawbytz.wordpress.com
// @version 2.4
// @description Reclaim Browser history shortcuts (Alt+Left/Right), move WorkFlowy's zoom shortcuts to Alt+Up/Down.
// @author rawbytz
// @match https://workflowy.com/*
// @match https://beta.workflowy.com/*
// @updateUrl https://github.com/rawbytz/reclaim-chrome-history/raw/master/reclaimChromeHistory.user.js
// @downloadUrl https://github.com/rawbytz/reclaim-chrome-history/raw/master/reclaimChromeHistory.user.js
// @grant none
// @run-at document-end
// ==/UserScript==(function () {
'use strict';document.addEventListener("keydown", function (event) {
if (event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {
switch (event.key) {
case "ArrowDown": // Alt+Down = zoom in
WF.zoomIn(WF.focusedItem());
break;
case "ArrowUp": // Alt+Up = zoom out
WF.zoomOut();
break;
case "ArrowLeft": // Alt+Left = Go Back in History
window.history.back();
event.stopImmediatePropagation();
event.preventDefault();
break;
case "ArrowRight": // Alt+Right = Go Forward in History
window.history.forward();
event.stopImmediatePropagation();
event.preventDefault();
break;
default:
break;
}
}
});
})(); -
Even better Frank... let me retire the script and WorkFlowy stops hijacking the browser history shortcuts for 90% of browser users.
btw, here's the official home of the script
https://github.com/rawbytz/reclaim-chrome-history -
Hi Frank,
Not sure if this is the right place to ask this, but... I work on a PC where Shift + Alt is the shortcut that switches between different language layouts for my keyboard. I need this since I work in multiple languages, but every time I try to move something in Workflowy, it switches the input language, and I end up typing in a different language. Moving things around quickly with keyboard shortcuts is the heart of my workflow, and I can't imagine working without it. I am trying to come back to Workflowy from Dynalist (I accumulated so much data that their system started bogging down, which is a total no-go for my workflow, as you might imagine!), but this is a sticking point to making the switch work. Custom shortcuts would solve this - I would love to be able to assign CTRL + arrow to move things around, and find some other combination to collapse / expand items (a less-used action for me, so it can be more clunky and I wouldn't mind). Quite honestly, I'd probably want to do this even if Shift + Alt didn't mess up my input language, as moving items is so central to my flow, and Shift + Alt requires repositioning my hand completely, while hitting CTRL doesn't, and I can keep whipping through things without a pause.
Thanks for any help!
DCish
Please sign in to leave a comment.
Comments
6 comments