Skip to content

feat: add copy identifier shortcut#769

Open
Green00101 wants to merge 1 commit into
PokemonWorkshop:developfrom
Green00101:feat/copy-identifier-shortcut
Open

feat: add copy identifier shortcut#769
Green00101 wants to merge 1 commit into
PokemonWorkshop:developfrom
Green00101:feat/copy-identifier-shortcut

Conversation

@Green00101

Copy link
Copy Markdown
Contributor

Description

Adds a keyboard shortcut (Ctrl + Shift + C, Option + Shift + C on macOS) to copy the current entity identifier.

  • The shortcut is registered inside the CopyIdentifier component, so all pages with a copy identifier button support it and the copied value is identical to the button's output.
  • A notification is shown after copying; the shortcut is documented in the button tooltip. Mouse interactions are unchanged.
  • Also added a "Copy identifier" entry in the Edit menu.

Closes #761

Note before testing

macOS was not tested, because I don't have a Mac device.

Tests to perform

  1. On each database page with a copy identifier button (Pokémon, Moves, Items...), press Ctrl + Shift + C: a single success notification appears and the clipboard contains the identifier with the : prefix (e.g. :bulbasaur), identical to the copy button output.
  2. On the Texts and Maps pages, the shortcut copies the id without the : prefix.
  3. Hover the copy button: the tooltip shows the shortcut; clicking it still works as before.
  4. Switch entity (Ctrl + Left/Right) then press the shortcut: the new entity's identifier is copied.
  5. On pages without a copy identifier button, the shortcut does nothing.

These are the tests I performed. Please let me know if there are any additional cases I should check.

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.

Keyboard Shortcut to Copy Entity Identifier

1 participant