Akuli / porcupine

A decent editor written in tkinter
MIT License
160 stars 46 forks source link

add key cheatsheet to user-doc? #1471

Open Akuli opened 6 months ago

Akuli commented 6 months ago

There was a key cheatsheet in the old Porcupine Wiki, deleted in #1470.

Content of key cheatsheet when it was deleted ``` Porcupine behaves a lot like other text editing programs, so you can just [install Porcupine](https://github.com/Akuli/porcupine/#installing-porcupine) and [[start using it|First Program]]. You can also do handy things to write things even faster, and that's what this page is all about. Start by checking if your keyboard has keys labelled Home, End, Page Up, Page Down and Delete. Sometimes these keys have abbreviated labels on them, for example, my keyboard's Page Down key is labelled PgDn. If your keyboard doesn't have all of these keys but you would like to do something with them, [let me know](https://github.com/Akuli/porcupine/issues/new) so I can add other key combinations that do the same thing. ## The Cheatsheet Here's a list of useful key combinations. Don't study this list by reading it, you'll learn it a lot better if you try these things yourself. On Mac, use the Command key instead of Control. [comment]: # (this table has really long lines, fortunately there's no style guide for writing markdown :D) | Key Combination | Without Control or Alt | With Control | With Control and Shift | With Alt | |---------------------------|-----------------------------------|-----------------------------------------------|---------------------------------------|---------------------------------------------------| | Arrow keys left and right | Move one character at a time | Move word by word | | | | Arrow keys up and down | Move to previous or next line | Move to next empty line | | | | Enter | New line | New line, don't auto-indent | | New line, with same indentation as prevoius line | | Backspace | Delete character before cursor | Delete the word before the cursor | Delete from line beginning to cursor | | | Del | Delete character after cursor | Delete word after cursor | Delete from cursor to line end | | | Home | Go to beginning of line | Go to beginning of the whole file | | | | End | Go to end of line | Go to end of file | | | | Page Up | Scroll up a screenful at a time | | | | | Page Down | Scroll down a screenful | | | | You can see many more key combinations by exploring the menu bar at top. ```

I have mixed thoughts about this. On the one hand, nobody ever used it. On the other hand, it could be useful for someone who wants to make their editing habits more efficient.

Here are rdbende's thoughts: (taken from #1470)

This looks good to me. Not sure how useful the key cheatsheet actually was, I expect most people use the accelerators shown in the menu anyway.

Although the tabular approach is pretty cool to explain the thinking behind the key combinations chosen.

ethical-haquer commented 5 months ago

Is there still a key cheat-sheet anywhere? I think there should still be one somewhere.

Akuli commented 5 months ago

Currently, the only place where you find a cheat sheet is this issue. (Click the little arrow thing. It will expand.)

Feel free to make a PR that adds the key cheatsheet to user-doc folder and updates it :)

ethical-haquer commented 5 months ago

Currently, the only place where you find a cheat sheet is this issue. (Click the little arrow thing. It will expand.)

Feel free to make a PR that adds the key cheatsheet to user-doc folder and updates it :)

👍 I know, I meant other than here though. By "update" you mean the key-combos have changed? Is there somewhere in the code to see them?

Akuli commented 5 months ago

I don't think they have changed much, but the table seems incomplete. It has many empty cells.

Instead of looking at the code, the best way to figure them out is to just press keys and see what happens. Most of the key bindings in the cheat sheet are the defaults for text widgets, while others are Porcupine-specific.

Also, instead of a key cheatsheet, maybe we should tell users how to experiment and learn that way. For example, if you can move with arrow keys, also try holding down control or shift while pressing arrow keys.