Page 1 of 1

Using Shift+ to pick controls

Posted: 2014-09-20, 14:36
by SoulRider
Hi Carsten,

I have a problem when working in CaWE. The problem is the fact that you use commands consisting of Shift+key. This means I have to switch CapsLock on and off everytime I want to type a Capital Letter, and for me this is unnatural. I am always selecting various tools, instead of typing a new entity name for example.

Could you make the tools use Ctrl+Shift+Key instead of just Shift+Key. Or could you advise if it would be relatively simple for me to make this change myself? It is a real pain for me :)

Re: Using Shift+ to pick controls

Posted: 2014-09-21, 20:57
by Carsten
You're right, this is a horrible problem, and I'm more than happy to change this.

Doing it is very easy, but I'm still not sure what new key combinations should be used. Right now, I'm considering Ctrl+1, ..., Ctrl+9, Ctrl+0. Any objections or other suggestions?
In any case I can most likely implement this tomorrow. :up:

Re: Using Shift+ to pick controls

Posted: 2014-09-21, 21:19
by SoulRider
All you need to do is take all commands that currently use Shift+Key, and change them to Ctrl+Shift+Key

So for example selecting the terrain tool becomes Ctrl+Shift+T instead of current Shift+T.

This means Ctrl+Key commands are unaffected as well.

Re: Using Shift+ to pick controls

Posted: 2014-09-21, 21:59
by Carsten
Well, yes, I understood this.
But I was still wondering if it wouldn't be worthwhile to take the opportunity to change e.g. for the selection tool from Shift+S to Ctrl+1 (instead of Ctrl+Shift+S).

Ctrl+1 would be easier to type, because it does not involve the Shift key,
whereas Ctrl+Shift+S would be easier to remember...

Re: Using Shift+ to pick controls

Posted: 2014-09-22, 20:28
by SoulRider
For me I like the easier to remember option, and Ctrl+Shift isn't much of a hassle when working in the editor.

Re: Using Shift+ to pick controls

Posted: 2014-09-22, 23:02
by Carsten
One last more question before I finally implement this:

Using Ctrl+Shift+... is perfectly fine with me, but I found a compromise that I would at least like to mention. Please see the attached screenshot:
ToolsMenu.png
As you can see, I used Ctrl+number, just for testing, but the interesting issue is that you can also use the "Alt" accelerator keys/characters. That is, if the menu is closed, the sequence Alt+T, B first opens the Tools menu, then selects the New Brush tool, just as Ctrl+3 would do.
(I chose the underlined accelerator characters largely according to their previous Shift+... key, in order to keep the already learned character unchanged.)

That is, using "Alt" with the underlined accelerator keys would make it possible to both keep the previous characters S, C, B, E, etc., and use Ctrl+number for the hotkeys. This is why I said that this might be a worthwhile compromise.

What do you think?

Btw., if you want to try this yourself, it's very easy: In file CaWE/MapEditor/ChildFrame.cpp around line 412, the code used for the above screenshot is this:

Code: Select all

wxMenu* item8 = new wxMenu;
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_SELECTION,      wxT("&Selection\tCtrl+1"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_CAMERA,         wxT("&Camera\tCtrl+2"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_NEWBRUSH,       wxT("New &Brush\tCtrl+3"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_NEWENTITY,      wxT("New &Entity\tCtrl+4"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_NEWBEZIERPATCH, wxT("New Bezier &Patch\tCtrl+5"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_NEWTERRAIN,     wxT("New &Terrain\tCtrl+6"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_NEWDECAL,       wxT("New &Decal\tCtrl+7"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_EDITSURFACEPROPERTIES, wxT("Edit S&urface Properties\tCtrl+8"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_TERRAINEDITOR,  wxT("Edit Te&rrain\tCtrl+9"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_CLIP,           wxT("Clip Br&ushes\tCtrl+Shift+X"), wxT(""));
item8->AppendRadioItem(ID_MENU_TOOLS_TOOL_EDITVERTICES,   wxT("Edit &Vertices\tCtrl+Shift+V"), wxT(""));
Hmmm... Maybe Ctrl+8 and Ctrl+9 should really be Ctrl+Shift+A and Ctrl+Shift+F ...

Re: Using Shift+ to pick controls

Posted: 2014-09-23, 21:34
by SoulRider
That works for me. I like that implementation. :)

Re: Using Shift+ to pick controls

Posted: 2014-09-23, 23:47
by Carsten
Ok, done! :up:

Note that I first made some related changes that our discussion above did not cover, and finally a change that largely implements the above, in the hope to have found a good balance of all related aspects and options.

As mentioned in the log message of the last commit, details about the suitability of plain characters such as C, Shift+C, Del, etc. as menu accelerators have been discussed e.g. at http://thread.gmane.org/gmane.comp.lib. ... vel/131663

Re: Using Shift+ to pick controls

Posted: 2014-09-27, 13:46
by SoulRider
Thanks for this. I am just merging the code now. :)