What's new

Keyboard Shortcuts - V3.0 Add-On Available - see Resources

bolsover

Senior Member
I like the text. Perhaps stretch all the keys taller with room for text above and below?
I'll see what can be done - currently, all the keys are fixed size and if I resize one, I'll have to resize and re-layout all. If I can fine a sensible way of resizing whilst retaining the overall layout it might work - but I'm concerned the tool will become too big. The existing form is 1600 * 430 pixels - so already wider than I would have liked.
 

bolsover

Senior Member
@NateLiquidGravity
How about this as a compromise - doesn't involve any extra work with the layout..
Images at 0.7 scale
1700076845200.png

Or this - Images at 0.5 scale:
1700077025227.png

I could make even smaller - but think 0.5 is smallest I'd be comfortable with.
 

Cator

Senior Member
I'm already thinking of an update..
What do you think..
I've added to relevant Alibre icon to the shortcut button and put in a tooltip.
Should I keep the shortcut text on the buttons or keep just the text and the button letter/symbol/digit.
The issue is that a button can really only have one image and one piece of text.
I could (maybe) put the Alibre icon in the tooltip - but looks a bit tricky and I would prefer to keep on the button..


View attachment 40111
Hi, David,
I appreciate the work you're doing but but I would make the icons small compared to the text I would make bold.
Whoever uses your addin wants to have as simple and rational a glance as possible so that they can print it like a photo in their mind. And so it seems a bit confusing to me, I imagine even worse with the icons of the Extrude, Sweep etc. functions.
Regards,
Francesco
 

HaroldL

Alibre Super User
Are these keyboard layouts supposed to be printed out or displayed on screen? Either way, I'm not seeing what, if any, modifiers are to be used with each key and the key letters are not visible along with the shortcut. :confused: :confused:
 

cadtec

Senior Member
I would prefer the graphic on the buttons and the description in the tooltip.
Text and graphics (0.5 scale) are also fine, as long as the text is not too long and overwrites the graphics.
 

simonb65

Alibre Super User
@bolsover (David), I would have put the icon in the bottom left of the key and still shown the key letter/symbol in the bottom right. At first glance, if you assign a lot of keys, it's difficult to relate which key is which without the actual keyboard letter/symbol on it. Great add-on though :cool:
 

bolsover

Senior Member
@HaroldL , @cadtec, @Cator , @simonb65
I think I have a solution that addresses most of the issues..

Restrictions
Winform buttons only support one image and one piece of text being shown concurrently. The location of the image and text can be reasonably well controlled. Buttons also support the use of a background image - but the location of this can not be very well controlled and does not really offer a solution to the layout problems.

Image
In the screen grab below, I have set the Alibre icons to 0.5 scale and have implemented a solution that allows the Alibre icon to be combined with the image of the button letter- so I only have one image to display.

Text
The button text is set at 8 point. This is a problem where the longer hint texts (like 'Perpendicular Constraint') cause a word to wrap over two lines. Making the text smaller really is not a solution as it becomes too small to read. There may be some way to abbreviate the hints but that would almost certainly make the add-on difficult to maintain as Alibre change or add to existing shortcuts.
Without a significant change to the layout there is not much I can do to prevent the text from running into the image.
So, for now, I'm sticking with 8 point. I might at some point offer the user some control over the text size/location/colour.

1700135384492.png

Colours
I'm adding a control that allows users to select their preferred colours:
1700135981094.png

Hopefully the key colour combination will help with identification of which modifier keys are selected (also shown below drop-down)

1700136135026.png
 

simonb65

Alibre Super User
Restrictions
Winform buttons only support one image and one piece of text being shown concurrently. The location of the image and text can be reasonably well controlled. Buttons also support the use of a background image - but the location of this can not be very well controlled and does not really offer a solution to the layout problems.
Just override the OnPaint event for the button and OwnerDraw the whole button, it's quite trivial in c#!
 

bolsover

Senior Member
Are these keyboard layouts supposed to be printed out or displayed on screen? Either way, I'm not seeing what, if any, modifiers are to be used with each key and the key letters are not visible along with the shortcut. :confused: :confused:
My intent was simply to provide an on-screen reminder of what shortcuts are available. Hopefully my previous post will help clarify. I should note that it's not yet ready for a release. I'm aware of a few bugs and inconsistencies in what I have at present!
I did at one point consider making the keyboard fully functional so that selected keys would get passed back to Alibre for processing - but sanity prevailed!!
 

bolsover

Senior Member
Just override the OnPaint event for the button and OwnerDraw the whole button, it's quite trivial in c#!
Currently, I have this..
C#:
private void SetButtonImages(Button button,  Image image1, Image image2)
        {
          
            int width = button.Width - 6;
            int height = Math.Max(image1.Height, image2.Height);

            Bitmap bitmap = new Bitmap(width, height);
            using (Graphics g = Graphics.FromImage(bitmap))
            {
                // Draw image1 at bottom-left
                g.DrawImage(image1, 0, height - image1.Height);
        
                // Draw image2 at bottom-right
                g.DrawImage(image2, width- image2.Width, height - image2.Height);
            }

            button.Image = bitmap;
        }

image1 is the Alibre icon, image2 is the key letter image.
 

NateLiquidGravity

Alibre Super User
I wouldn't need the buttons to operate as keys, but if you find out how to assign shortcuts to the profile - being able to do it with those buttons would be amazing!
FYI there are some keyboard shortcuts that you can't assign in Alibre Design - some make sense to me and some don't.
Edit: Can you make the keys proportional to the window size so that it can be resized?
 

bolsover

Senior Member
I wouldn't need the buttons to operate as keys, but if you find out how to assign shortcuts to the profile - being able to do it with those buttons would be amazing!
FYI there are some keyboard shortcuts that you can't assign in Alibre Design - some make sense to me and some don't.
Edit: Can you make the keys proportional to the window size so that it can be resized?
Thanks for the feedback. Assigning Alibre shortcuts from the keyboard view is unlikely to happen. Reason... Say I want to assign some key combination (like Ctrl+Shift+Z) to some action in Alibre. I have to get the list of available actions, display these in a tree like manner with branches for profile, file, view etc. and then have the user pick the desired action. It seems so much like the existing Alibre solution... I'm sure it 'could' be done and it would possibly provide a clearer idea of what shortcut is assigned to which key combination - but it is a big task and TBH I'm worried about messing up the user profile. Reading the profile is reasonably safe - writing not so much!

Shortcuts you can't assign -- please elaborate.

I have thought about making the keys proportional to the window size - I'll take a closer look at what is involved. I know it will not be very simple since not only would I need to dynamically adjust the button sizes (probably with some limits) but also the the text and icon sizes would ideally change at the same time.

The next version will provide much more control over text and icon size to suit individual tastes. I want to do some more testing but I'll probably upload this weekend.

David
 

Stu3d

Senior Member
I like the application of 1 or 2 letter shortcuts. It's too bad Alibre doesn't allow 2 letter assignments without the Shift, Ctrl, or Alt modifiers.

Using Shift +(letter) or Ctrl+(letter) or Alt+(letter) makes sense for one-handed initiation of the shortcut. But where it becomes a 2-handed operation is when there is a Shift+Ctrl+(letter) or Shift+Alt+(letter) combination. Kind of takes away from any speed you may gain from the shortcut.
Sticky Keys included in Windows solves that problem
 

bolsover

Senior Member
i have no idea what that means - the .zip file can be downloaded from the github page: https://github.com/bolsover/AlibreShortcuts/releases/tag/V3.1
I guess defender might object if it thinks there is some security problem ... The file is safe.
david
 

Cator

Senior Member
I deactivated the antivirus and installed everything ok.
But the moment I reactivated the zip file it was blocked again.
Has anyone else had this behavior?
 
Top