Add an example for custom key mappings by pdx91 · Pull Request #850 · hotwired/stimulus

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@pdx91

Copy link

@pdx91 pdx91 commented

Jul 17, 2025

No description provided.

Comment on lines +109 to +114

keyMappings: {
...defaultSchema.keyMappings,
at: "@",
slash: "/",
question: "?"
},

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.

Comment on lines +123 to +125

<div data-controller="search"
data-action="keydown.slash->search#focus keydown.question->search#showHelp">
</div>

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@MatheusRich MatheusRich MatheusRich left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@pdx91 @MatheusRich