Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Events
Pecan:
There's a lot of code here that might help you intercept/insert keys and characters.
KeyMacs
http://forums.codeblocks.org/index.php/topic,9980.msg70445.html#msg70445
Alpha:
Thank you everyone for your responses :).
--- Quote from: oBFusCATed on November 08, 2011, 01:41:17 am ---... And an advanced version, showing a dialog to enter a value.
For example I want to be able to wrap strings in wxT("...."), _("...."),
so if I type in the dialog wxT, or _ the plugin will wrap it automatically.
--- End quote ---
This sounds like an additional feature that would be quite useful. Would you suggest I try to add this dialog to the core application, or as a plugin?
--- Quote from: ollydbg on November 08, 2011, 01:59:11 am ---You can have a look at the file "sdk\cbstyledtextctrl.cpp"
...
Here, the "tab smart jump" was implemented, that is mostly the same place you can implement your feature. Right?
--- End quote ---
Yes, I think this is exactly what I was looking for.
--- Quote from: thomas on November 08, 2011, 09:22:18 am ---Most people will expect that if they have a text selected and press a key such as {, then the selection will be erased and replaced with a single character. That's how it works in pretty much every editor, anywhere.
vi probably has a key for such a thing, and if vi doesn't, then emacs probably does (they have a keys for every crap, just I can't remember any of them). Might be worthwile to look there, and use that combination, so it's "somewhat standards compliant".
--- End quote ---
I know that I would find it most efficient to have this bound to the actual key, however others (I assume) would prefer it as a shortcut, or not at all. It is in my plan to have some sort of setting to choose between these - and I will do some reading on vi and emacs to find out what their key combination(s) is (are).
--- Quote from: Pecan on November 08, 2011, 02:30:13 pm ---There's a lot of code here that might help you intercept/insert keys and characters.
KeyMacs
http://forums.codeblocks.org/index.php/topic,9980.msg70445.html#msg70445
--- End quote ---
Thanks, I will take a look at that.
oBFusCATed:
--- Quote from: Alpha on November 08, 2011, 11:26:54 pm ---This sounds like an additional feature that would be quite useful. Would you suggest I try to add this dialog to the core application, or as a plugin?
--- End quote ---
Your priority should be this:
0. script <--biggest priority here
1. plugin
2. core
smallB:
@Alpha I think it's great idea. Something like Alt + Bracket_Type would disambiguate situation.
Alpha:
Alt + Bracket_Type sounds like another good option; I will try it as well.
--- Quote from: oBFusCATed on November 08, 2011, 11:40:05 pm ---
--- Quote from: Alpha on November 08, 2011, 11:26:54 pm ---This sounds like an additional feature that would be quite useful. Would you suggest I try to add this dialog to the core application, or as a plugin?
--- End quote ---
Your priority should be this:
0. script <--biggest priority here
1. plugin
2. core
--- End quote ---
OK; I probably will not work on this until I have completed the original modification though.
As a note, I do not know if I will have any time to work on this before the weekend (although, I am feeling a bit of pressure now that I know a bunch of other people like it :)).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version