[PR #70] [MERGED] Support multiple keybindings to a single command #82

Closed
opened 2026-03-14 12:31:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/hackernews-TUI/pull/70
Author: @aome510
Created: 4/28/2022
Status: Merged
Merged: 4/28/2022
Merged by: @aome510

Base: mainHead: rewrite-keymap


📝 Commits (10+)

  • 1fde52b fix command typo in README
  • 5125e6b try to deserialize toml value as either vec or string
  • 193ce1d parse key strings into a list of event::Event
  • 682d021 use multiple event::Event to represent the Key struct
  • a37630f handle formatting key with multiple events
  • 393e958 rename Key to Keys
  • 01b807c add [back] button
  • 30e1f32 update defaults for some of edit/global keymap
  • 5dbf5cf update ROADMAP
  • e34480e remove backtick when displaying help view

📊 Changes

10 files changed (+339 additions, -262 deletions)

View changed files

📝 README.md (+40 -39)
📝 config.md (+13 -6)
📝 examples/hn-tui.toml (+7 -7)
📝 hackernews_tui/src/config/keybindings.rs (+256 -194)
📝 hackernews_tui/src/utils.rs (+7 -0)
📝 hackernews_tui/src/view/article_view.rs (+2 -2)
📝 hackernews_tui/src/view/comment_view.rs (+2 -2)
📝 hackernews_tui/src/view/help_view.rs (+6 -6)
📝 hackernews_tui/src/view/search_view.rs (+5 -5)
📝 hackernews_tui/src/view/story_view.rs (+1 -1)

📄 Description

Brief description of changes

  • support multiple keybindings to a single command by specifying either a key string or an array of key strings in the config file
  • add [back] button to the application's footer

Breaking changes

  • modify the default shortcuts for
    • global_keymap.quit
    • global_keymap.goto_previous_view
    • global_keymap.goto_search_view
    • edit_keymap.move_cursor_left
    • edit_keymap.move_cursor_right
    • edit_keymap.move_cursor_to_begin
    • edit_keymap.move_cursor_to_end

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/hackernews-TUI/pull/70 **Author:** [@aome510](https://github.com/aome510) **Created:** 4/28/2022 **Status:** ✅ Merged **Merged:** 4/28/2022 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `rewrite-keymap` --- ### 📝 Commits (10+) - [`1fde52b`](https://github.com/aome510/hackernews-TUI/commit/1fde52b940cfa5829a4ad175c6d15d516735e482) fix command typo in README - [`5125e6b`](https://github.com/aome510/hackernews-TUI/commit/5125e6b4ad9f5693f1a62f6ef99f5c808fbe59ad) try to deserialize toml value as either vec<string> or string - [`193ce1d`](https://github.com/aome510/hackernews-TUI/commit/193ce1ddab621fb399c5ca8c92fc5a251f1fb075) parse key strings into a list of `event::Event` - [`682d021`](https://github.com/aome510/hackernews-TUI/commit/682d021082e20945330a0c6a357748463cc2ab7e) use multiple `event::Event` to represent the `Key` struct - [`a37630f`](https://github.com/aome510/hackernews-TUI/commit/a37630f60f0c729961c393360aa4cdfd5603f097) handle formatting key with multiple events - [`393e958`](https://github.com/aome510/hackernews-TUI/commit/393e958da86494a284828be3ba58c4e134540f4c) rename `Key` to `Keys` - [`01b807c`](https://github.com/aome510/hackernews-TUI/commit/01b807c6d469354925fde3de9a0dd6af61e8e860) add `[back]` button - [`30e1f32`](https://github.com/aome510/hackernews-TUI/commit/30e1f32fee7c7d21c5786639ef80007a2e51c1f0) update defaults for some of edit/global keymap - [`5dbf5cf`](https://github.com/aome510/hackernews-TUI/commit/5dbf5cf9e94e21a953a8c4d415e5133c2d29402c) update ROADMAP - [`e34480e`](https://github.com/aome510/hackernews-TUI/commit/e34480e6b9464be1a0a7b132e743b5b5c74f7bf0) remove backtick when displaying help view ### 📊 Changes **10 files changed** (+339 additions, -262 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+40 -39) 📝 `config.md` (+13 -6) 📝 `examples/hn-tui.toml` (+7 -7) 📝 `hackernews_tui/src/config/keybindings.rs` (+256 -194) 📝 `hackernews_tui/src/utils.rs` (+7 -0) 📝 `hackernews_tui/src/view/article_view.rs` (+2 -2) 📝 `hackernews_tui/src/view/comment_view.rs` (+2 -2) 📝 `hackernews_tui/src/view/help_view.rs` (+6 -6) 📝 `hackernews_tui/src/view/search_view.rs` (+5 -5) 📝 `hackernews_tui/src/view/story_view.rs` (+1 -1) </details> ### 📄 Description ## Brief description of changes - support multiple keybindings to a single command by specifying either **a key string** or **an array of key strings** in the config file - add `[back]` button to the application's footer ## Breaking changes - modify the default shortcuts for - `global_keymap.quit` - `global_keymap.goto_previous_view` - `global_keymap.goto_search_view` - `edit_keymap.move_cursor_left` - `edit_keymap.move_cursor_right` - `edit_keymap.move_cursor_to_begin` - `edit_keymap.move_cursor_to_end` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 12:31:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hackernews-TUI#82
No description provided.