Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve keyboard handling #387

Merged
merged 9 commits into from
Feb 24, 2019
Merged

Conversation

ederag
Copy link
Collaborator

@ederag ederag commented Feb 9, 2019

Shortcuts (#230)
Arrows to navigate between dates and facts.

checks

The following are tests, and show potential uses.

Left/Right arrow: change dates

With nothing selected
Ctrl-R: do nothing
Ctrl-N: new empty fact
Ctrl-+: new empty fact
Ctrl-Enter or Enter: do nothing

Select one fact
Ctrl-R clone, starting now
Ctrl-N new empty fact
Ctrl-+ clone, starting now
Ctrl-Enter or Enter: edit selected fact

Create a new fact
if not selected
Delete: do nothing
select the fact
Delete: fact deleted

With enough dates to have more facts than can fit in the overview,
to check scrolling,
check that the following keys work also right at the start of overview,
(without having to focus on the FactTree itself)
Up, Down,
Home, End (change selected fact)
Page up, Page down, (just scroll)

With an ongoing fact
Ctrl+Space: stop

Resume: start now a clone of the selected activity.

Ctrl-+: clone or fallback to new if none selected.
        (same as pressing the + button)
Ctrl-R: only Resume (clone) an existing fact.
Ctrl-N: only new.
For consistency (only do something if it makes sense),
and early bug catching,
let delete_row(fact) eventually raise exception downstream
if fact is None.
- move elif to match the correct if (indentation)
- forward also KEY_Home, KEY_End, and KEY_Delete
@ederag ederag mentioned this pull request Feb 9, 2019
@ederag ederag changed the title [WIP] Improve keyboard handling Improve keyboard handling Feb 24, 2019
@ederag ederag merged commit d86e07f into projecthamster:master Feb 24, 2019
@ederag ederag deleted the improve_shortcuts branch February 24, 2019 18:56
@GeraldJansen
Copy link
Contributor

Nice! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants