News for hackers. Stuff that matters.
Re:Show HN: Edna, note taking app for developers by spartanatreyu on Monday July 01, 2024 @07:45PM (#40852056)
This is nice, but I'm surprised you went with "P" for shortcuts since they're already taken by browsers.

Ctrl/Cmd + P = Print Ctrl/Cmd + Shift + P = New Private Window

Re:Show HN: Edna, note taking app for developers by bjeanes on Monday July 01, 2024 @07:49PM (#40852089)
Command + P worked for me in Firefox, but Command + Shift + P did not.

Further, because I don't type in QWERTY, I noticed that _some_ shortcuts seem correctly mapped in my layout, but others are not. The Option+N shortcut for a new note just starts the "˜" combining character (expecting a following character like "n" to form "ñ") when using the "n" key in my layout. However it works if I use the physical "n" key (which is my "k").

I feel like that explanation is pretty poor, but yeah basically some shortcuts seem bound to the physical key location whereas others seem bound to the mapped key. I wonder if they are declared differently?

Re:Show HN: Edna, note taking app for developers by spartanatreyu on Tuesday July 02, 2024 @12:05AM (#40853462)
Sounds like it's using event.keyCode (deprecated) or event.code (key button number) instead of event.key (the character that the button represents).
Re:Show HN: Edna, note taking app for developers by kjksf on Tuesday July 02, 2024 @03:12AM (#40854244)
I only use that for `Alt + 1` - `Alt + 9` quick access shortcuts.

`Alt + N` for new scratch note is implemented via `Mod-n` CodeMirror keymap (keymap.js) so I'm not sure why it wouldn't work.

Re:Show HN: Edna, note taking app for developers by kjksf on Tuesday July 02, 2024 @03:05AM (#40854223)
Undocumented: Ctrl + K and Ctrl + O also work.

Ctrl + K was actually the first. Ctrl + O because it's naturally "open". And you can switch to command palette with `>`, like in vs code.

I've added Ctrl + P and made it the documented one because I also use VS Code heavily and I was tired of context switching.

It's unfortunate that it conflicts with browser's Print but I figured that you do this often and print rarely.

The ultimate solution, of course, is to allow customizing keybindings.