Add an example for custom key mappings by pdx91 · Pull Request #850 · hotwired/stimulus
Navigation Menu
{{ message }}
- Notifications You must be signed in to change notification settings
- Fork 443
Open
Add an example for custom key mappings#850
pdx91 wants to merge 1 commit intohotwired:mainfrom
Add an example for custom key mappings#850
pdx91 wants to merge 1 commit intohotwired:mainfrom
Conversation
MatheusRich reviewed Jul 23, 2025
Comment on lines +109 to +114
| keyMappings: { | ||
| ...defaultSchema.keyMappings, | ||
| at: "@", | ||
| slash: "/", | ||
| question: "?" | ||
| }, |
Copy link
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this doesn't add much. The example below could use the existing at mapping.
MatheusRich reviewed Jul 23, 2025
Comment on lines +123 to +125
| <div data-controller="search" | ||
| data-action="keydown.slash->search#focus keydown.question->search#showHelp"> | ||
| </div> |
Copy link
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| <div data-controller="search" | |
| data-action="keydown.slash->search#focus keydown.question->search#showHelp"> | |
| </div> | |
| <div data-controller="mentions" | |
| data-action="keydown.at->mentions#displaySuggestions"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment