Posted by: Steve Walmsley
« on: December 29, 2021, 10:38:23 AM »Hello Steve
I am wondering if it would be possible to fix or add a blind accessibility feature
I have only experienced this in ship design tab however it could be present in other areas of game as well.
When I want to add a component to a ship design I tab to the component I want to add
However I then have to use a couple keyboard commands to route cursor to screen reader focus and double click using a keyboard command because it requires you to double left click on a mouse which I can’t use.
However this is teadious and I’m wondering if you could change it so I could add a component by clicking the space bar or enter key once or twice. As this is the keys I use to select things usually
Also this is just another suggestion would it be possible for you to add a keyboard shortcut to move between the component select bit of window to the details of ship/component design as at the moment I have to tab all the way round to that window
I replied to your personal message, but I'll replicate here for anyone else who is interested.
*********************
Hi,
For v2.0, spacebar can be used as a hot key for double-click when adding or removing components from a class design.
The above only required a few minutes. The second request took a little longer
At first, I added Page Down as a hot key to cycle between the Add Component treeview, the Remove Component treeview and the text details of the class. However, once the textbox gets focus it doesn't want to give it up and apparently this is a common problem. After two hours of research online and trial and error, I gave up on that approach. Next I just changed the tab order so that the summary text box was immediately after remove components. However, the tab order didn't work as expected. Eventually I found out that the tab order is nested. If you have two container controls on a form, each with multiple sub-controls, the tab order will find the container control with the lowest tab index and then go through all sub-controls within that container control regardless of how their tab index numbers compare to the sub-controls of the other container.
The summary textbox (and every other control to the right of the treeviews on the form) is on a large container control that I move back and forth as the Class windows toggles between normal view and wide view. So I decided to remove the container and move all the sub-controls manually. Now they were all on the same level of the control hierarchy as the treeview controls, so they could share the same tab order. That's when I found out that cutting from the container control and pasting directly on the form removed all the event code associated with each button, checkbox, etc. Cue panic!
Fortunately, Visual Studio allows you to undo step by step using ctrl-Z. After a few minutes of undoing, I was back with the original design. Now I made the window much larger, dragged the sub-controls out of the container rather than using cut-and-paste, then deleted the container and put everything back in the right place. I added some code to handle wide vs normal view and then finally fixed the tab order.
The tab order is now (in wide view) add components, remove components and summary text. As I am sure you know, you can shift-tab to go backwards. I also took the opportunity to tidy up the tab order for all of the class design view so it is in a more logical order. After four hours, I managed to finish what I thought was a five minute job but I learned a lot about tab order in the process
Regards,
Steve