Skip to content

Docs: Document System Keyboard & Click Modifier Flags (.ctrl, .alt, .shift, .meta, .cmd) in Action Event Handlers #775

Description

@nathanschmid08

Summary

Document system key modifier flags (.ctrl, .alt, .shift, .meta, .cmd) supported in template event bindings (e.g. @click.ctrl="openInNewTab", @keydown.meta.enter="submitForm").

Context & Current State

EventBinder supports system modifier key filters via SYSTEM_MODIFIER_MAP (ctrl, alt, shift, meta, cmd). While key modifiers like .enter and .esc are documented in events.md, system key modifier flags and combination syntax (such as @keydown.cmd.enter) are omitted from the event modifiers reference table and usage guides.

Proposed Documentation Changes

  1. Actions & Event Handling (docs/src/content/docs/core-concepts/events.md):
    • Update the Event Modifiers table to include .ctrl, .alt, .shift, .meta, and .cmd with descriptions of their behavior on mouse and keyboard events.
    • Add practical code examples showing system modifier bindings (e.g. @click.ctrl, @click.meta, @keydown.cmd.enter).
    • Clarify platform differences (e.g. .cmd as a cross-platform alias for .meta) and explain how system modifier key evaluation runs before event expression execution.

Labels

  • documentation
  • enhancement
  • good first issue

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions