ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.35k stars 105 forks source link

mostly changes to keyboard use #425

Closed jm289765 closed 10 months ago

jm289765 commented 1 year ago

this pull request is mostly changes to keyboard functionality for adding and editing todos, but it does include some other changes.

arrow keys: up/down to select todos, left/right to select first/last todo. if the first or last todo is selected, up/down will move the focus to the search bar; up/down with the search bar focused will select the first/last todo.

enter or x: mark todo as done. space: open editor modal. delete: delete todo (see #409 ). (previously, it was x to mark as done, enter to edit, no space or delete shortcut)

in the search box, enter will add the search text as a new todo.

in the editor modal, priority and date changing shortcuts are done with alt or ctrl instead of win+alt or win+ctrl. these shortcuts now also work on the selected todo when the editor isn't open.

at the bottom of the screen, i've added an extra page of blank space so that you can scroll a little past the last todo. this prevents todos from moving up on the screen when you delete one while scrolled all the way down. this may be a source of inconvenience: with a large todo.txt file, you might not scroll down far enough past the bottom for more todos to load.

i've also changed the context menu positioning to match most web browsers; i.e. if you right click near the bottom-right of the screen, the menu opens with its bottom-right corner at your cursor.

i haven't added automatic tests for most of this.

ransome1 commented 1 year ago

@jm289765 thanks a ton for the PR. Please give me some time to look at it.

durgaswaroop commented 1 year ago

enter or x: mark todo as done. space: open editor modal

Enter to mark a to-do as done doesn't seem very intuitive to me. I've been using Enter to open a to-do without even needing to read any help documentation. I think we should keep that.