JdeRobot / VisualCircuit

Visual programming of robots using hardware blocks composition and Python
https://jderobot.github.io/VisualCircuit/
12 stars 14 forks source link

Added Alt+R and Alt+r as shortcut key for Renaming of blocks #283

Closed BkPankaj closed 4 months ago

BkPankaj commented 4 months ago

Changes Made

  1. There are three blocks which has rename functionality ( constant, input and output ), implemented keydown event handler to detect the Alt+R or Alt+r key combination when particular block is selected.
  2. Ensured that the shortcut key functionality only works when the lock on internal blocks containing constant, input, or output is opened, preventing any unintended changes to internal blocks with locks.

Related Issues

Fixes: #282

Screenshots

When the lock on an internal block is open, pressing Alt+R opens a dialog box for renaming - Screenshot

In the main canvas, after pressing the shortcut key for renaming- Screenshot

toshan-luktuke commented 4 months ago

PR looks good, let me test it once and then we can proceed

toshan-luktuke commented 4 months ago

Tested it, its working fine. Thanks for the feature