cpbotha / nvpy

Simplenote syncing note-taking application, inspired by Notational Velocity and ResophNotes, but uglier and cross-platformerer.
Other
849 stars 114 forks source link

Add shortcuts #203

Closed mleo2003 closed 4 years ago

mleo2003 commented 4 years ago

Add shortcuts for copying note title from list, erase a word with standard shortcut.

mleo2003 commented 4 years ago

Added the Control-Delete shortcut as well as Control-Backspace.

This should satisfy #165

yuuki0xff commented 4 years ago

Thank you for your contribution. I found a bug in cmd_text_copy(). In the Linux environment, it always copies the note title on the top of list. The intention is to copy the title of selected note, right?

mleo2003 commented 4 years ago

Ah, yes. That is the intention. I'm not sure why the Linux version is different than the Windows version in this regard. I'll see if I can setup something to test it with.

mleo2003 commented 4 years ago

After a quick check in Windows, I can confirm this is a bug for multiple platforms, and I know why: I'm getting the event data for a click/mouse event, and then applying it to a keyboard shortcut. My original testing was a click, then a Control+C on the item, which works. As it is now, it just copies whichever note title your mouse hovers over, even if not selected...

I'll try to fix, or I can just remove from this PR and add it back later once I actually implement it correctly, instead of copying the click event code right above it...

mleo2003 commented 4 years ago

It helps to just use the built-in idx that is recorded on every note change from that menu, instead of blindly copy/pasting code from other functions...

Should be ready to go @yuuki0xff