Studio 2.0 and remapping the Delete command

Studio 2.0 and remapping the Delete command

Another step towards making Studio easier to use for a LEGO Digital Designer veteran.

My second annoyance with Studio was that I was repeatedly hitting the D key every time I wanted to remove a piece. The D key is mapped to the Delete command in LDD, but not in Studio. In Studio you’ll need to use the Delete or Backspace key. Two keys that are on the opposite side of the keyboard from D, far away from the left hand. They’re close to the right hand, but I don’t like to switch between keyboard and mouse while working.

Now one would think that this could easily be resolved by remapping the command in the settings, but for some unknown reason the Delete command (and several other) can not be remapped.

Delete and other commands locked

Regardless what ever reason they have, I found it highly annoying. So annoyingly that I started to look for solutions.

Going back to the Registry

My first annoyance was solved by mucking about in the registry, so I headed back there to see what I could find. Under HKEY_CURRENT_USER\Software\BrickLink\Studio, I found two registry key values of interest: Ins_KeyboardShortcutPref_h359114898 and KeyboardShortcutPref_v2_h4068047586

Values of interest

First one didn’t contain much, but the second one contained what looked like keyboard mappings. It has various key combination followed by a command name. Like “space:ForceReleaseBrick” and “ctrl+a:SelectAllBricks”. It was easy to confirm that it was used for keyboard mappings by changing some values and seeing the change in Studio.

Sadly there was no mapping for the Delete command in the registry key value. But I knew that depending on how Studio was coded, this might not be a dead end. If I was lucky, the remapping of the Delete command was only locked in the GUI and it might be possible to change other mappings by adding more text to the registry key. So hoping for the best, I added “d:Delete” to the registry key value and started up Studio.

Success! It worked. I could now remove pieces by hitting the D key! And not only that, the Delete key and Backspace key was still mapped too.

But Studio was not a fan of my little trick. Every time I closed it down, my addition would be removed from the registry.

Creating a more permanent solution.

So I needed a way to update the Registry every time I start up Studio. The quickest solution I could come up with was creating a .bat file with the following text in it. The first (and very long) line updates the Registry and the second one, starts Studio. By using this to start Studio, I’ll always have the D key working as I want it.

reg add HKCU\Software\BrickLink\Studio /v KeyboardShortcutPref_v2_h4068047586 /t REG_SZ /d “UpdateData:1,space:ForceReleaseBrick,ctrl+a:SelectAllBricks,ctrl+f:BuildingPalette_Search,ctrl+equals:ZoomIn,ctrl+minus:ZoomOut,ctrl+alpha0:ZoomToFit,tab:ExpandBuildingPalette,leftarrow:Rotate_Left,rightarrow:Rotate_Right,uparrow:Rotate_Forward,downarrow:Rotate_Backward,shift+leftarrow:Rotate_Left_45,shift+rightarrow:Rotate_Right_45,shift+uparrow:Rotate_Forward_45,shift+downarrow:Rotate_Backward_45,t:ActionPalette_Translation,r:ActionPalette_Rotation,ctrl+t:AddStep,ctrl+g:CreateIntoSubModel,ctrl+u:ReleaseSubModel,ctrl+l:Hide,shift+ctrl+l:ShowAll,ctrl+slash:HideAllPanels,ctrl+b:HideGround,backquote:CameraRotation_Free,keypad1:CameraRotation_Front,keypad2:CameraRotation_Back,keypad3:CameraRotation_Left,keypad4:CameraRotation_Right,keypad5:CameraRotation_Top,keypad6:CameraRotation_Bottom,keypad7:CameraRotation_Ortho,v:SelectMode_Default,shift+v:SelectMode_CycleMode,shift+ctrl+v:SelectMode_InvertSelection,h:HingeTool,c:CloneTool,l:HideTool,ctrl+alt+c:ToggleCollision,d:Delete,” /fstart "" “C:\Program Files\Studio 2.0\Studio.exe

This solution is not exactly optimal as I need to update my script whenever I make any other changes the keyboard mappings. But I’ll probably not do that often enough to motivate me to make a better solution. Right now, it works good enough for me.