News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Key binding for 'Select target...' dialog is eventually overwritten

Started by Butter-Swimming Butterfly, February 09, 2019, 02:07:28 AM

Previous topic - Next topic

Butter-Swimming Butterfly

Any key-binding to the 'Select target...' dialog automatically clears while (and periodically after) Code::Blocks initiates.

This issue prevents me from adopting the key-command layout I want:
F1 => Select target...
F2 => Build
F3 => Build and Run
CTRL-F3 => Run (without building)
Can this key-binding issue be fixed in the next Code::Blocks release?



Edit: Wrong forum section. I think I was supposed to post this on the 'General' board.

BlueHazzard

Are other settings also cleared, or only the key bindings?
What operating system, what codeblocks version?
Is only the select target binding affected, or other bindings also?

Pecan

Currently you cannot bind a permanent key to the Select target menu item because its sub menus disappear when CB is closed and it has no sub menus to bind to when CB is opened.

That menu item is actually just a place holder for a list dialog. I doubt that wxWidgets will ever have the ability to accept a key binding to such a transient object.


BlueHazzard

Does he want to open the target dialog, or does he want to select a speciffic target?
Maybe this can be solved with some scripting. Does the key binder plugin supports only calling a script?

Pecan

Quote from: BlueHazzard on February 10, 2019, 02:36:52 PM
Does he want to open the target dialog, or does he want to select a speciffic target?
Maybe this can be solved with some scripting. Does the key binder plugin supports only calling a script?

Keybinder uses no scripts.
Keybinder has no scripting support.

Butter-Swimming Butterfly

Quote from: Pecan on February 09, 2019, 11:47:29 PM
Currently you cannot bind a permanent key to the Select target menu item because its sub menus disappear when CB is closed and it has no sub menus to bind to when CB is opened.

That menu item is actually just a place holder for a list dialog. I doubt that wxWidgets will ever have the ability to accept a key binding to such a transient object.

I know (Menu bar -> Build -> Select target) descends into a sub-menu that partially changes to correspond with the active project's contained targets. By 'that' menu item, are you referring to the one I want to bind with? (Menu bar -> Build -> Select target -> Select target...)? I don't know anything about wxWidgets, but I'm guessing it doesn't allow altering menu contents without creating/destroying the entire menu at once. I don't understand otherwise.

oBFusCATed

It should be possible to be fixed. I'll have to experiment a bit. Ping me in a week if you don't hear anything from me.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Butter-Swimming Butterfly

Alright. Does the problem still appear to be fixable?

oBFusCATed

Yes, I have a fix, but I've not committed it yet, because I want to test it a bit more.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]