Skip to content

fix: add Enter key to trigger active primary buttons#85

Closed
patrickoleary wants to merge 1 commit intoKitware:masterfrom
patrickoleary:fix/return-key-active-buttons
Closed

fix: add Enter key to trigger active primary buttons#85
patrickoleary wants to merge 1 commit intoKitware:masterfrom
patrickoleary:fix/return-key-active-buttons

Conversation

@patrickoleary
Copy link
Copy Markdown
Member

Add global Enter key support that routes to the currently active primary action button.

  • Global keydown listener registered via ClientTriggers — fires regardless of input focus
  • Server-side _enter_action routes Enter based on active context:
  1. State export dialog → triggers save/download
  2. File loading dialog → imports state file if selected, otherwise loads simulation + connectivity files
  3. Variable selection → loads selected variables

Each action respects the same disabled conditions as its button

closes #79

@jourdain
Copy link
Copy Markdown
Collaborator

jourdain commented May 1, 2026

Wrong solution, the various places where we expect "enter" to validate current action should handle it locally with the standard event binding of vue.

@jourdain jourdain closed this May 1, 2026
@patrickoleary
Copy link
Copy Markdown
Member Author

No I tried that. It won't work because it doesn't have focus. so you can't do it locally.

@patrickoleary patrickoleary reopened this May 1, 2026
@jourdain
Copy link
Copy Markdown
Collaborator

jourdain commented May 1, 2026

Make the field or button in focus

@jourdain
Copy link
Copy Markdown
Collaborator

jourdain commented May 1, 2026

And if you don't want to have anything in focus and just handle "enter", then you should use our current set of keyboard shortcut here

@patrickoleary patrickoleary force-pushed the fix/return-key-active-buttons branch from 7616e49 to 8d21952 Compare May 1, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return key does not work for file loading/ state file download

3 participants