[PR #32] [MERGED] [no-issue] allow fully customizable shortcuts #59

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

📋 Pull Request Information

Original PR: https://github.com/aome510/hackernews-TUI/pull/32
Author: @aome510
Created: 4/27/2021
Status: Merged
Merged: 4/27/2021
Merged by: @aome510

Base: mainHead: add-fully-customizable-shortcuts


📝 Commits (10+)

  • 1381a40 implement default for config::Theme
  • 189b502 add keybindings.rs
  • 9dc97bd implement default keymaps
  • d480328 fix build errors
  • baa9a30 add default keymap configurations to the default toml file
  • db0241b change hard-coded keys in main.rs to config keys
  • ba9f651 change hard-coded keys in search_view.rs to config keys
  • 264cc3d remove j,k,t,b from list_view default keys
  • deb22d2 change hard-coded keys in story_view.rs to config keys
  • 6b26574 change hard-coded keys in comment_view.rs to config keys

📊 Changes

12 files changed (+783 additions, -334 deletions)

View changed files

📝 README.md (+26 -23)
📝 examples/assets/help_view.png (+0 -0)
📝 src/config.rs (+52 -26)
📝 src/hn-tui-default.toml (+83 -0)
src/keybindings.rs (+281 -0)
📝 src/main.rs (+60 -108)
📝 src/view/comment_view.rs (+66 -43)
📝 src/view/help_view.rs (+149 -61)
📝 src/view/list_view.rs (+0 -21)
📝 src/view/search_view.rs (+12 -16)
📝 src/view/story_view.rs (+50 -33)
📝 src/view/utils.rs (+4 -3)

📄 Description

  • add keybindings.rs to load user-defined shortcuts from config file or generate a default keybindings
  • change all hard-coded keys in each View to the corresponding keys defined in keybindings.rs
  • update the default key shortcuts
  • update help_view
  • update README.md

🔄 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/32 **Author:** [@aome510](https://github.com/aome510) **Created:** 4/27/2021 **Status:** ✅ Merged **Merged:** 4/27/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `add-fully-customizable-shortcuts` --- ### 📝 Commits (10+) - [`1381a40`](https://github.com/aome510/hackernews-TUI/commit/1381a4059b5f6e7f2fe35640e6f47581541fb6d5) implement default for config::Theme - [`189b502`](https://github.com/aome510/hackernews-TUI/commit/189b5020141e776cfb4d47f266a00e0f0e769dbf) add keybindings.rs - [`9dc97bd`](https://github.com/aome510/hackernews-TUI/commit/9dc97bd144074ffb6621c4b7dc387a8ff895ce71) implement default keymaps - [`d480328`](https://github.com/aome510/hackernews-TUI/commit/d4803282191201f564db92cbad5f518f2100e253) fix build errors - [`baa9a30`](https://github.com/aome510/hackernews-TUI/commit/baa9a302d4eefaa0ff6fd21889f73669b64ae678) add default keymap configurations to the default toml file - [`db0241b`](https://github.com/aome510/hackernews-TUI/commit/db0241bd31635f4eaa1cef5baa758cb1f113ffea) change hard-coded keys in main.rs to config keys - [`ba9f651`](https://github.com/aome510/hackernews-TUI/commit/ba9f6513b884eff00a41421bbca482a552e9e872) change hard-coded keys in search_view.rs to config keys - [`264cc3d`](https://github.com/aome510/hackernews-TUI/commit/264cc3de1c800bce166827807edfd92f8eec339e) remove j,k,t,b from list_view default keys - [`deb22d2`](https://github.com/aome510/hackernews-TUI/commit/deb22d226eb55e40aa942856a1d46e67c3012167) change hard-coded keys in story_view.rs to config keys - [`6b26574`](https://github.com/aome510/hackernews-TUI/commit/6b26574c9bd3cbe4756ce346a69b52342105b8b8) change hard-coded keys in comment_view.rs to config keys ### 📊 Changes **12 files changed** (+783 additions, -334 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+26 -23) 📝 `examples/assets/help_view.png` (+0 -0) 📝 `src/config.rs` (+52 -26) 📝 `src/hn-tui-default.toml` (+83 -0) ➕ `src/keybindings.rs` (+281 -0) 📝 `src/main.rs` (+60 -108) 📝 `src/view/comment_view.rs` (+66 -43) 📝 `src/view/help_view.rs` (+149 -61) 📝 `src/view/list_view.rs` (+0 -21) 📝 `src/view/search_view.rs` (+12 -16) 📝 `src/view/story_view.rs` (+50 -33) 📝 `src/view/utils.rs` (+4 -3) </details> ### 📄 Description - add `keybindings.rs` to load user-defined shortcuts from config file or generate a default keybindings - change all hard-coded keys in each `View` to the corresponding keys defined in `keybindings.rs` - update the default key shortcuts - update `help_view` - update `README.md` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 12:29:52 +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#59
No description provided.