Note the addition of accesskey="s" after type="button" to set Control+Option+s as the hotkey for the Save button. You'd make the same modification for the other buttons.
The bad news is that you may encounter shortcut conflicts implementing the obvious shortcuts ("s" for Save, "v" for View, etc.).
Webkit (on which the Custom HTML form relies) uses Control+Option to fire any accesskey. So if you use Control+Option+s to trigger some other macro (as I do), that trigger takes precedence over the accesskey setting.
You just have to make sure your accesskey doesn't conflict with an existing macro trigger or system shortcut. In my case, that isn't possible so I didn't implement it.
Thanks for explaining! It is good news and I think that would work for my use case, i.e. I don't think there will be any serious conflicts. However, adding accesskey="s" according to your instructions does not work for me, nothing happens when I hit Control+Option+S (I've also tried other access keys with the same result). I'm using macOS 10.14.6 and KM 9.0.3. Any ideas?
I tested this on High Sierra with Keyboard Maestro v9. I used the View button to open the file in BBEdit and then assembled a note before using the hotkey I set up (Control-Option-Hyphen). It took a heartbeat or two before it appeared but it did appear. I'd test again that way because support for accesskey is not something that would disappear in Webkit once it's in, it seems to me. If you still don't get the save, try a different hotkey (you may have an unrecognized conflict; there's more than one source).
Fight fire with fire. Use the Submit Front Browser Form action to set up a hot key for Napkin's Save button in a completely separate macro.
Thanks for the ideas. Regarding idea 1 I have tried several different hotkeys and it does not work regardless. Idea 2 sounds very interesting, especially if it would allow to set any kind of standard macro trigger. However, I do not know how to implement this, could you give some guidance what to put in the Submit Front Browser Form function?
I've tried several variations on that second idea but none of them have worked. It seems Keyboard Maestro doesn't treat its Custom HTML prompt as a browser.
There's at least one more variation I haven't tested yet, though.
To implement this for yourself (if you want to confirm it doesn't work, that is), create a new macro, name it "Submit" or something like that, add your hotkey trigger, enable it and add the one action (Submit Front Browser Form, say). That's it.
With Napkin running, hit your hotkey and you'll see Napkin does not save your text. It just ignores you.
So Keyboard Maestro doesn't think its Custom HTML Prompt is a browser, I guess.
I'm not clear why the first solution is eluding you. So I've created a small macro that has just a Custom HTML Prompt in it with some text and an OK button with a hotkey.
If you wouldn't mind trying it and letting me know if it works or not, I'd appreciate it. The hotkey is Control + Option + Hyphen so if that conflicts with anything in your environment, you can change it in the code. Command + Up activates it.
Hi Mike! Thank you so much for sharing this macro!
I am looking for something super simple to take quick notes.
Your macro has a lot of stuff that I don't really need and I would like to make some changes, but I'm not sure how to achieve them. Would you be able to help me with that?
So all I need is really a window like the one from the original "Quick Note Taking System" by @BKammer
The only thing I'm not a fan of on his macro is the one-line field for the body and I would like to have a text area for multi lines.
Then I would also like to customize the appearance as well, but I believe with my basic knowledge of HTML and CSS I will be able to do that, as long as the functionality of the app does what I need.
So here's what I would like to do:
1 - By default, embed in the code, it would always save the files to, for example, my Desktop. I don't need to set a location every time I create a new note, because that's time that I spend and also distracting
2 - The file name could be an extra filed, like his macro has. So one for the title and one for the body and the title would also be included in the body, so when I copy/paste to my Notes app, it would be ready to go.
3 - If possible, hitting the ESCAPE key would behave as a QUIT, so I wouldn't need to click QUIT at all (the button would also be gone).
4 - At the moment, I see this as the default. Not sure if it's intended or a bug. If it's a bug, how would that be removed?
5 - I would like the window to always be centered on the screen
6 - To customize it, would it be as simple as using basic HTML and CSS, right? I'm all about dark themes, so I would like to customize it that way
I'm scrambling to be Somewhere Else Shortly so I'll have to come back to this to address your individual points. But No. 4 is a puzzle. You shouldn't be seeing that. Here's what I see (with an unreleased version that changed the colors):
As for eliminating things, I'd just point out that they don't get in your way once you've set them, so you might just think of them as visible preferences. I'm not inclined to remove them because they would force your particular preferences on others (like me). Less flexibility isn't a design goal but you're certainly free to pursue it if the shoe fits.
I have someone helping me with another solution, which is exactly what I needed: create a note directly inside the Notes app, because using your macro I would still need to then convert them to notes inside the app. I thought the Notes app solution wasn't possible and that's why I checked alternatives.
Regarding the version with less options, I wasn't obviously asking you to change your macro, but just to help me with my version. To me having too many options just because "I might need them" (when I clearly know I won't) isn't always a good thing. To me, visual distractions are worse and of course, I could always go back and download your macro again, should I needed it
If you're interested in checking the macro I'm having help with:
Well, just to follow up on one item that may be of general interest (since iamdannywyatt's issue was with an export to Notes resolved elsewhere), you can activate the Escape key to close Napkin by simply adding that condition to the Main action:
OK, new and improved v0.9o (with version number display between the Help and Quit buttons). This version detects v8's limitations and should work with versions about that, including v10. Includes the new color scheme, too.