Skip to content

Add shortcut for rename connection #142

@invisal

Description

@invisal

Add "F2" shortcut for rename the connection. You can listen for key down event here (https://github.com/invisal/query-master/blob/main/src/renderer/screens/HomeScreen/index.tsx#L204)

You can add the shortcut key at the Keybinding provider (https://github.com/invisal/query-master/blob/main/src/renderer/contexts/KeyBindingProvider.tsx)

You can use context to access the keybinding

  const { binding } = useKeybinding();
  const keyRenaming = binding['rename'];

The keybinding has nice method for get the matching

keyRenaming.match(e)

To trigger rename, you can simply setRenameSelectedItem(true)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions