Skip to content

feat: Keyboard Shortcuts (RDFA-365)#181

Open
kiph-soptim wants to merge 7 commits into
mainfrom
feature/RDFA-365-Keyboard-shortcuts
Open

feat: Keyboard Shortcuts (RDFA-365)#181
kiph-soptim wants to merge 7 commits into
mainfrom
feature/RDFA-365-Keyboard-shortcuts

Conversation

@kiph-soptim

@kiph-soptim kiph-soptim commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Added Shortcut dialog.
Added the following shortcuts

Action Shortcut
Import Schema (RDFS) Ctrl + I
Export Schema (RDFS) Ctrl + E
Import Constraints (SHACL) Ctrl + Shift + I
Export Constraints (SHACL) Ctrl + Shift + E
Share Snapshot Ctrl + Shift + S
Save Class Ctrl + S
New Class Ctrl + Shift + N
New Package Ctrl + Alt + N
Edit Package Ctrl + Shift + K
Enable / Disable Editing Ctrl + Alt + R
Manage Namespaces Ctrl + Shift + A
Create / Edit Profile Header Ctrl + Alt + P
Compare Schemas Ctrl + Shift + C
Changelog Ctrl + Shift + H
Migrate Schema Ctrl + Shift + M
Constraints Full View (SHACL) Ctrl + Shift + L
Focus Search Ctrl + F
Keyboard Shortcuts ?
Settings Ctrl + Alt + S

Related Issues

Checklist

  • Tests added or updated (or not applicable)
  • Documentation updated (or not applicable)
  • No breaking changes introduced (or described in the summary above)
  • Commits are signed off (git commit -s) for DCO

Testing Notes

@kiph-soptim kiph-soptim marked this pull request as ready for review June 16, 2026 12:51
@abba-soptim abba-soptim self-requested a review June 16, 2026 13:25

@abba-soptim abba-soptim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some general things I have noticed:

  • The CTRL+Shift+N shortcut for "New Class" does not work in the Chrome browser. The default behaviour of the hotkey is triggered, which is opening a new incognito window. The shortcut does however function in Firefox.
  • The FocusSearch hotkey CTRL+F has weird behaviour with the built-in Search in Document function of web browsers. Pressing the shortcut key once selects and highlights the search bar, but pressing it a second time opens the search function in the browser. Just wanted to point it out, I think completely overwriting the default search function isn't a good idea, so this solution is actually pretty smart. But maybe you have a better idea (unless this was deliberate). Another small thing: the highlight for the search bar is very faint, even though it is not directly part of this story, it would be better to make it more visible (increasing the blue border radius).
  • ENTER is still used to accept/save in all dialogs. This makes sense for confirmation dialogs such as the DeleteConfirmDialog, but editor dialogs such as AttributeEditor require a Save action to close the dialog sucessfully. I would suggest reusing the CTRL+S shortcut here, consistent with saving a class. Another idea would be to allow it as well as the normal ENTER shortcut.

Comment thread frontend/src/lib/eventhandling/shortcutStore.svelte.js Outdated
Comment thread frontend/src/lib/eventhandling/shortcutStore.svelte.js
*/
function normalizeEvent(event) {
const key = event.key.toLowerCase();
const isSpecialChar = key.length === 1 && !/[a-z0-9]/.test(key);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the need for this, but this also fires for shortcuts like "CTRL+-". This might lead to unexplainable behaviour down the line.

Comment thread frontend/src/routes/layout/menu-bar/Edit.svelte
Comment thread frontend/src/routes/layout/menu-bar/Edit.svelte Outdated
Comment thread frontend/src/routes/mainpage/classEditor/components/ClassEditorButtons.svelte Outdated
Comment thread frontend/src/routes/Searchbar.svelte Outdated
Comment thread frontend/src/routes/+layout.svelte
Comment thread frontend/src/routes/+layout.svelte Outdated
Comment thread frontend/src/routes/+layout.svelte Outdated
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.

2 participants