Hi Wolfgang,
I haven't reproduced the "browser defaults are used" issue in Firefox (I don't have Palemoon), but I've added a probable fix in 0.17.9, give it a try.
>
I don't understand what "a non-editable inside a tiddler is in focus" means and <esc> should do.
In a tiddler, you can have various focusable elements (links, buttons, inputs like from the <<option>> macro, etc). You can move (focus) from one to another with Tab/Shift+Tab (standard browser behavior), but if you do, it's way too slow to get back to the state when "the tiddler itself" is in focus and the shortcuts work (for instance, Enter to start editing). So I added the behavior when pressing Escape gets you to that state. "Editables" are inputs, textereas, etc, while "non-editables" are links, buttons, and some others.
> "d" does not delete tiddler (which is better so, I think)
Like discussed earlier, it currently only works if deleteTiddler command is in the ToolbarCommands::ViewToolbar.
> some shortcuts do not make sense
For most of the shortcuts that doesn't fit your needs, you can remove it similarly to what is described in KeyboardShortcuts##Customizing shortcuts – just use an empty array like this:
config.commands.collapseTiddler.hotkeys = []
For now it's not very convenient, though, as the KeyboardShortcuts for now mixes command names and descriptions, for a description the command name should be found in the code, and non-commands can't be customized like that (since otherShortcuts are not accessible outside the plugin code yet). I'll probably improve these aspects once I start adding UI to customize shortcuts.
[for this section, see the PS below first]
> global "m" opens MainMenu, where arrow-up/-down selects menu entries and <enter> opens menu
Note that you can use Tab/Shift+Tab and Enter already (the plugin makes the the focused one visible and focuses the first one once you open a popup – same for references, etc). But yes, supporting arrows to navigate and Escape to close is also planned.
As for "m" for your type of MainMenu, you can first set (again, see KeyboardShortcuts)
config.macros.keyboardShortcuts.jumpableAreas["main menu"] = { selector: '#topMenu [title="menu"]', keys: "KeyM" }
This will overwrite the current global "m" shortcut and focus your button. Unfortunatelly, it won't "click" the button, so you'll have to press Enter for now.
Likewise, for history, you can use title="history", i.e.
config.macros.keyboardShortcuts.jumpableAreas["history"] = { selector: '#topMenu [title="history"]', keys: "KeyH" }
title="back" and title="forward" for next/prev tiddler...
Let me show how I decide what selector to use for "global shortcuts for new tiddler":
- I open browser inspector/dev tools (usually ctrl+shift+I);
- I click the button on the left to the "Inspector" tab (ctrl+shift+c in Firefox, not sure if it works this way in Palemoon);
- I click the target element (i.e. the "new tiddler" button) – it will be "selected" in the inspector;
- Finally, I have to decide on the path that will be specific enough for this element. This may be tricky for a non-developer, but here are 2 possible shortcuts:
- If it has a specific title, like in this case, I can use just the title (attribute) selector: selector: '[title="Create a new tiddler"]'
- If it has not, I can right click in the inspector and copy..CSS path. It will give a very verbose selector like this: 'html body div#contentWrapper div#displayArea div#tiddlerDisplay div#tiddlerKeyboardShortcuts.tiddler.shadow span.viewer a.button', and sometimes it will work.. but not in this case, unfortunatelly: first, the div#tiddlerKeyboardShortcuts part is too specific (will work only in the KeyboardShortcuts tiddler), and the span.viewer
a.button part is too inspecific (you can see in the inspector that there are other span-s with class viewer with a inside that has class button – for instance "edit"), that's why I used the attribute selector and omitted the rest. Still, it can help in some cases.
Let me know how it goes, I'll consider improving the descriptions for the customizing docs.
PS Ah, sorry, the trick with jumpableAreas won't probably work exactly as I've described. The problem is, it's designed for the areas with a selectable things inside it (like normal MainMenu), while in this case the areas has no children, they have to be selected themselves, and also a "click"/enter is needed to activate them. I'll probably add such a customization feature in the next version.
> in edit mode shortcuts for "done", "cancel"...
This is readily available, please let me know what's unclear in KeyboardShortcuts##Customizing shortcuts, I'll fill the gaps.
Again, for now all these customizations require creating a plugin. At some point I'll probably make it possible to do this with just UI and options, but not very soon, I guess.
воскресенье, 5 октября 2025 г. в 07:55:52 UTC+3, Wolfgang: