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

Group narrowing commands and improve descriptions #1516

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions docs/hotkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@
|Scroll down|<kbd>PgDn</kbd> / <kbd>J</kbd>|
|Go to bottom / Last message|<kbd>End</kbd> / <kbd>G</kbd>|
|Trigger the selected entry|<kbd>Enter</kbd> / <kbd>Space</kbd>|
|Narrow to all messages|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Narrow to all direct messages|<kbd>P</kbd>|
|Narrow to all starred messages|<kbd>f</kbd>|
|Narrow to messages in which you're mentioned|<kbd>#</kbd>|

## Switching Messages View
|Command|Key Combination|
| :--- | :---: |
|View the stream of the current message|<kbd>s</kbd>|
|View the topic of the current message|<kbd>S</kbd>|
|Zoom in/out the message's conversation context|<kbd>z</kbd>|
|Switch message view to the compose box target|<kbd>Meta</kbd> + <kbd>.</kbd>|
|View all messages|<kbd>a</kbd> / <kbd>Esc</kbd>|
|View all direct messages|<kbd>P</kbd>|
|View all starred messages|<kbd>f</kbd>|
|View all messages in which you're mentioned|<kbd>#</kbd>|
|Next unread topic|<kbd>n</kbd>|
|Next unread direct message|<kbd>p</kbd>|

Expand All @@ -49,9 +57,6 @@
| :--- | :---: |
|Edit message's content or topic|<kbd>e</kbd>|
|Show/hide emoji picker for current message|<kbd>:</kbd>|
|Narrow to the stream of the current message|<kbd>s</kbd>|
|Narrow to the topic of the current message|<kbd>S</kbd>|
|Narrow to a topic/direct-chat, or stream/all-direct-messages|<kbd>z</kbd>|
|Toggle first emoji reaction on selected message|<kbd>=</kbd>|
|Toggle thumbs-up reaction to the current message|<kbd>+</kbd>|
|Toggle star status of the current message|<kbd>Ctrl</kbd> + <kbd>s</kbd> / <kbd>*</kbd>|
Expand Down Expand Up @@ -90,7 +95,6 @@
|Save current message as a draft|<kbd>Meta</kbd> + <kbd>s</kbd>|
|Autocomplete @mentions, #stream_names, :emoji: and topics|<kbd>Ctrl</kbd> + <kbd>f</kbd>|
|Cycle through autocomplete suggestions in reverse|<kbd>Ctrl</kbd> + <kbd>r</kbd>|
|Narrow to compose box message recipient|<kbd>Meta</kbd> + <kbd>.</kbd>|
|Exit message compose box|<kbd>Esc</kbd>|
|Insert new line|<kbd>Enter</kbd>|

Expand Down
45 changes: 23 additions & 22 deletions zulipterminal/config/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,30 +169,30 @@ class KeyBinding(TypedDict):
},
'STREAM_NARROW': {
'keys': ['s'],
'help_text': 'Narrow to the stream of the current message',
'key_category': 'msg_actions',
'help_text': 'View the stream of the current message',
'key_category': 'narrowing',
},
'TOPIC_NARROW': {
'keys': ['S'],
'help_text': 'Narrow to the topic of the current message',
'key_category': 'msg_actions',
'help_text': 'View the topic of the current message',
'key_category': 'narrowing',
},
'TOGGLE_NARROW': {
'keys': ['z'],
'help_text':
"Zoom in/out the message's conversation context",
'key_category': 'narrowing',
},
'NARROW_MESSAGE_RECIPIENT': {
'keys': ['meta .'],
'help_text': 'Narrow to compose box message recipient',
'key_category': 'compose_box',
'help_text': 'Switch message view to the compose box target',
'key_category': 'narrowing',
},
'EXIT_COMPOSE': {
'keys': ['esc'],
'help_text': 'Exit message compose box',
'key_category': 'compose_box',
},
'TOGGLE_NARROW': {
'keys': ['z'],
'help_text':
'Narrow to a topic/direct-chat, or stream/all-direct-messages',
'key_category': 'msg_actions',
},
'REACTION_AGREEMENT': {
'keys': ['='],
'help_text': 'Toggle first emoji reaction on selected message',
Expand All @@ -205,33 +205,33 @@ class KeyBinding(TypedDict):
},
'ALL_MESSAGES': {
'keys': ['a', 'esc'],
'help_text': 'Narrow to all messages',
'key_category': 'navigation',
'help_text': 'View all messages',
'key_category': 'narrowing',
},
'ALL_PM': {
'keys': ['P'],
'help_text': 'Narrow to all direct messages',
'key_category': 'navigation',
'help_text': 'View all direct messages',
'key_category': 'narrowing',
},
'ALL_STARRED': {
'keys': ['f'],
'help_text': 'Narrow to all starred messages',
'key_category': 'navigation',
'help_text': 'View all starred messages',
'key_category': 'narrowing',
},
'ALL_MENTIONS': {
'keys': ['#'],
'help_text': "Narrow to messages in which you're mentioned",
'key_category': 'navigation',
'help_text': "View all messages in which you're mentioned",
'key_category': 'narrowing',
},
'NEXT_UNREAD_TOPIC': {
'keys': ['n'],
'help_text': 'Next unread topic',
'key_category': 'navigation',
'key_category': 'narrowing',
},
'NEXT_UNREAD_PM': {
'keys': ['p'],
'help_text': 'Next unread direct message',
'key_category': 'navigation',
'key_category': 'narrowing',
},
'SEARCH_PEOPLE': {
'keys': ['w'],
Expand Down Expand Up @@ -449,6 +449,7 @@ class KeyBinding(TypedDict):
HELP_CATEGORIES = {
"general": "General",
"navigation": "Navigation",
"narrowing": "Switching Messages View",
"searching": "Searching",
"msg_actions": "Message actions",
"stream_list": "Stream list actions",
Expand Down
Loading