diff --git a/docs/hotkeys.md b/docs/hotkeys.md index c05e0886e3..280e1f0337 100644 --- a/docs/hotkeys.md +++ b/docs/hotkeys.md @@ -83,6 +83,13 @@ |Autocomplete @mentions, #stream_names, :emoji: and topics|Ctrl + f| |Cycle through autocomplete suggestions in reverse|Ctrl + r| |Narrow to compose box message recipient|Meta + .| +|Jump to the previous line|Up / Ctrl + p| +|Jump to the next line|Down / Ctrl + n| +|Clear compose box|Ctrl + l| + +## Editor actions +|Command|Key Combination| +| :--- | :---: | |Jump to the beginning of line|Ctrl + a| |Jump to the end of line|Ctrl + e| |Jump backward one word|Meta + b| @@ -95,7 +102,4 @@ |Cut backwards to the start of the current word|Ctrl + w| |Paste last cut section|Ctrl + y| |Undo last action|Ctrl + _| -|Jump to the previous line|Up / Ctrl + p| -|Jump to the next line|Down / Ctrl + n| -|Clear compose box|Ctrl + l| diff --git a/zulipterminal/config/keys.py b/zulipterminal/config/keys.py index 9e2ace94f9..ac3355beff 100644 --- a/zulipterminal/config/keys.py +++ b/zulipterminal/config/keys.py @@ -323,77 +323,77 @@ class KeyBinding(TypedDict): 'BEGINNING_OF_LINE': { 'keys': ['ctrl a'], 'help_text': 'Jump to the beginning of line', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'END_OF_LINE': { 'keys': ['ctrl e'], 'help_text': 'Jump to the end of line', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'ONE_WORD_BACKWARD': { 'keys': ['meta b'], 'help_text': 'Jump backward one word', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'ONE_WORD_FORWARD': { 'keys': ['meta f'], 'help_text': 'Jump forward one word', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'DELETE_LAST_CHARACTER': { 'keys': ['ctrl h'], 'help_text': 'Delete previous character (to left)', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'TRANSPOSE_CHARACTERS': { 'keys': ['ctrl t'], 'help_text': 'Transpose characters', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'CUT_TO_END_OF_LINE': { 'keys': ['ctrl k'], 'help_text': 'Cut forwards to the end of the line', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'CUT_TO_START_OF_LINE': { 'keys': ['ctrl u'], 'help_text': 'Cut backwards to the start of the line', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'CUT_TO_END_OF_WORD': { 'keys': ['meta d'], 'help_text': 'Cut forwards to the end of the current word', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'CUT_TO_START_OF_WORD': { 'keys': ['ctrl w'], 'help_text': 'Cut backwards to the start of the current word', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'PASTE_LAST_CUT': { 'keys': ['ctrl y'], 'help_text': 'Paste last cut section', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'UNDO_LAST_ACTION': { 'keys': ['ctrl _'], 'help_text': 'Undo last action', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'PREV_LINE': { 'keys': ['up', 'ctrl p'], 'help_text': 'Jump to the previous line', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'NEXT_LINE': { 'keys': ['down', 'ctrl n'], 'help_text': 'Jump to the next line', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'CLEAR_MESSAGE': { 'keys': ['ctrl l'], 'help_text': 'Clear compose box', - 'key_category': 'msg_compose', + 'key_category': 'editor', }, 'FULL_RENDERED_MESSAGE': { 'keys': ['f'], @@ -415,6 +415,7 @@ class KeyBinding(TypedDict): "msg_actions": "Message actions", "stream_list": "Stream list actions", "msg_compose": "Composing a Message", + "editor": "Editor actions", } ZT_TO_URWID_CMD_MAPPING = {